xv6-65oo2/zombie.c

15 lines
215 B
C
Raw Normal View History

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