blob: 9bed1fe48668426d50e00f6d2b32b4be1e7e6f8f [file] [log] [blame]
Denys Vlasenko8ed57272009-02-25 14:24:02 +00001#include <stdlib.h>
2#include <unistd.h>
3
4int main(int argc, char *argv[])
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00005{
Denys Vlasenko8ed57272009-02-25 14:24:02 +00006 if (fork() == 0) {
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00007 write(1, "child\n", 6);
Denys Vlasenko8ed57272009-02-25 14:24:02 +00008 } else {
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00009 wait(0);
10 write(1, "parent\n", 7);
11 }
Denys Vlasenko8ed57272009-02-25 14:24:02 +000012
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000013 exit(0);
14}