2016-08-25 13:13:00 +00:00
|
|
|
// 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
|
|
|
|
2019-06-11 13:57:14 +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)
|
|
|
|
{
|
2007-08-24 20:04:53 +00:00
|
|
|
if(fork() > 0)
|
2007-08-27 13:34:35 +00:00
|
|
|
sleep(5); // Let child exit before parent.
|
2019-09-10 16:30:10 +00:00
|
|
|
exit(0);
|
2007-08-08 08:38:55 +00:00
|
|
|
}
|