Files
MIT6.828_OS/xv6-public/zombie.c
2019-07-06 15:59:43 +08:00

15 lines
214 B
C

// Create a zombie process that
// must be reparented at exit.
#include "types.h"
#include "stat.h"
#include "user.h"
int
main(void)
{
if(fork() > 0)
sleep(5); // Let child exit before parent.
exit();
}