xv6-riscv-kernel/user/zombie.c

15 lines
233 B
C
Raw Normal View History

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