xv6-65oo2/user/zombie.c
2019-06-11 09:57:14 -04:00

15 lines
233 B
C

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