Commit 1f841854 authored by Thomas Haller's avatar Thomas Haller

core: add nm_utils_kill_child_async() and nm_utils_kill_child_sync() function

Add utility function to kill and reap a child process.

https://bugzilla.gnome.org/show_bug.cgi?id=725660Signed-off-by: Thomas Haller's avatarThomas Haller <thaller@redhat.com>
parent c469e81f
......@@ -182,6 +182,7 @@ valgrind-*.log
/src/tests/test-dcb
/src/tests/test-dhcp-options
/src/tests/test-general
/src/tests/test-general-with-expect
/src/tests/test-ip4-config
/src/tests/test-ip6-config
/src/tests/test-wifi-ap-utils
......
This diff is collapsed.
......@@ -59,6 +59,14 @@ str_if_set (const char *str, const char *fallback)
return str ? str : fallback;
}
typedef void (*NMUtilsKillChildAsyncCb) (pid_t pid, gboolean success, int child_status, void *user_data);
void nm_utils_kill_child_async (pid_t pid, int sig, guint64 log_domain, const char *log_name,
guint32 wait_before_kill_msec,
NMUtilsKillChildAsyncCb callback, void *user_data);
gboolean nm_utils_kill_child_sync (pid_t pid, int sig, guint64 log_domain, const char *log_name,
int *child_status, guint32 wait_before_kill_msec,
guint32 sleep_duration_msec);
gboolean nm_match_spec_string (const GSList *specs, const char *string);
gboolean nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr);
gboolean nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels);
......
......@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
noinst_PROGRAMS = \
test-dhcp-options \
test-general \
test-general-with-expect \
test-ip4-config \
test-ip6-config \
test-dcb \
......@@ -75,11 +76,19 @@ test_general_SOURCES = \
test_general_LDADD = \
$(top_builddir)/src/libNetworkManager.la
####### general-with-expect test #######
test_general_with_expect_SOURCES = \
test-general-with-expect.c
test_general_with_expect_LDADD = \
$(top_builddir)/src/libNetworkManager.la
####### secret agent interface test #######
EXTRA_DIST = test-secret-agent.py
###########################################
TESTS = test-dhcp-options test-ip4-config test-ip6-config test-dcb test-resolvconf-capture test-general
TESTS = test-dhcp-options test-ip4-config test-ip6-config test-dcb test-resolvconf-capture test-general test-general-with-expect
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment