summaryrefslogtreecommitdiff
path: root/test/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/fork.c')
-rw-r--r--test/fork.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/fork.c b/test/fork.c
new file mode 100644
index 0000000..3f68f67
--- /dev/null
+++ b/test/fork.c
@@ -0,0 +1,10 @@
+main()
+{
+ if (fork() == 0)
+ write(1, "child\n", 6);
+ else {
+ wait(0);
+ write(1, "parent\n", 7);
+ }
+ exit(0);
+}