diff options
Diffstat (limited to 'zombie.c')
-rw-r--r-- | zombie.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,5 @@ -// Create a zombie process. +// Create a zombie process that +// must be reparented at exit. #include "types.h" #include "stat.h" @@ -10,7 +11,6 @@ main(void) int i; if(fork() > 0) - for(i=0; i<10; i++) - yield(); + sleep(5); // Let child exit before parent. exit(); } |