summaryrefslogtreecommitdiff
path: root/user/zombie.c
blob: 8b89a338fcaa0ccc21bef5c6d3c6d0d53c8a9afc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
}