xv6-cs450/zombie.c

15 lines
215 B
C
Raw Normal View History

2007-08-27 15:34:35 +02:00
// Create a zombie process that
// must be reparented at exit.
2007-08-08 10:38:55 +02:00
#include "types.h"
#include "stat.h"
#include "user.h"
int
main(void)
{
if(fork() > 0)
2007-08-27 15:34:35 +02:00
sleep(5); // Let child exit before parent.
2007-08-08 10:44:11 +02:00
exit();
2007-08-08 10:38:55 +02:00
}