summaryrefslogtreecommitdiff
path: root/zombie.c
blob: 077c02c886a8df2697f19e3cb05c92b990a2d30e (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 "types.h"
#include "stat.h"
#include "user.h"

int
main(void)
{
  if(fork() > 0)
    sleep(5);  // Let child exit before parent.
  exit();
}