first commit
This commit is contained in:
14
user/zombie.c
Normal file
14
user/zombie.c
Normal file
@ -0,0 +1,14 @@
|
||||
// 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);
|
||||
}
|
||||
Reference in New Issue
Block a user