aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fork.c')
-rw-r--r--tests/fork.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/fork.c b/tests/fork.c
new file mode 100644
index 0000000..7bbc4c2
--- /dev/null
+++ b/tests/fork.c
@@ -0,0 +1,15 @@
+#include <unistd.h>
+
+int
+main(void)
+{
+ switch (fork()) {
+ case -1:
+ return -1;
+ case 0:
+ return 2;
+ default:
+ usleep(100000U);
+ return 1;
+ }
+}