From c6a8697800376a02b868cdea8fc1bf55f12798f1 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 16 Dec 2019 23:14:45 +0100 Subject: Introduce helper functions for safe fork+exec of processes In some situations, we want to execute an external shell command in a non-blocking way. Similar to 'system', but without waiting for the child to complete. We also want to close all file descriptors ahead of the exec() and filter + modify the environment. Change-Id: Ib24ac8a083db32e55402ce496a5eabd8749cc888 Related: OS#4332 --- tests/Makefile.am | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/Makefile.am') diff --git a/tests/Makefile.am b/tests/Makefile.am index 3a3ea376..bf7017b1 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -60,8 +60,10 @@ check_PROGRAMS += \ $(NULL) endif -if ENABLE_STATS_TEST -check_PROGRAMS += stats/stats_test +if !EMBEDDED +check_PROGRAMS += \ + stats/stats_test \ + exec/exec_test endif if ENABLE_GB @@ -259,6 +261,9 @@ use_count_use_count_test_LDADD = $(LDADD) context_context_test_SOURCES = context/context_test.c context_context_test_LDADD = $(LDADD) +exec_exec_test_SOURCES = exec/exec_test.c +exec_exec_test_LDADD = $(LDADD) + # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac :;{ \ @@ -334,6 +339,7 @@ EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) \ use_count/use_count_test.ok use_count/use_count_test.err \ context/context_test.ok \ gsm0502/gsm0502_test.ok \ + exec/exec_test.ok exec/exec_test.err \ $(NULL) DISTCLEANFILES = atconfig atlocal conv/gsm0503_test_vectors.c -- cgit v1.2.3