Files
xv6-custom-os/zombie.c
2022-12-06 11:49:47 +00:00

14 lines
232 B
C

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