From a8699a58d8632f21e897ea5c4900a15483a9a8ca Mon Sep 17 00:00:00 2001 From: Toby Goodwin Date: Tue, 2 Sep 2014 08:01:39 +0100 Subject: release: rc-1.7.2 --- testcld.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 testcld.c (limited to 'testcld.c') diff --git a/testcld.c b/testcld.c new file mode 100644 index 0000000..83212e9 --- /dev/null +++ b/testcld.c @@ -0,0 +1,19 @@ +#include +#include +#include +#include +#include +int main(void) { + int i; + sigset(SIGCLD, SIG_IGN); + switch (fork()) { + case -1: + return 1; + case 0: + return 0; + default: + sleep(1); + if (wait(&i) == -1 && errno == ECHILD) return 0; + else return 1; + } +} -- cgit v1.2.3