xv6-65oo2/user/zombie.c
Frans Kaashoek 7e6c37e67e Support exit status for exit/wait
One test case for returning a exit status
Passes usertests, but haven't used it to simplify tests
2019-09-10 12:30:10 -04:00

15 lines
234 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(0);
}