xv6-65oo2/user/zombie.c

15 lines
234 B
C
Raw Permalink Normal View History

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