summaryrefslogtreecommitdiff
path: root/testcld.c
diff options
context:
space:
mode:
authorToby Goodwin <toby@paccrat.org>2018-03-01 21:37:18 +0000
committerToby Goodwin <toby@paccrat.org>2018-03-01 21:37:18 +0000
commit5b624196125034b95d504be682127a5964e08da5 (patch)
tree56d3477069e7541dcb67f36fc3b960f6f9abe076 /testcld.c
parent5966ab2ca2632c5bed9815def1add4859beececa (diff)
parent67a87ad0104d88e8b1711a3831d616598edb30c2 (diff)
Merge branch 'master' into ifnot
Diffstat (limited to 'testcld.c')
-rw-r--r--testcld.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/testcld.c b/testcld.c
deleted file mode 100644
index 83212e9..0000000
--- a/testcld.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <unistd.h>
-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;
- }
-}