1 // Test preemption by forking off a child process that just spins forever.
2 // Let it run for a couple time slices, then kill it.
7 umain(int argc
, char **argv
)
11 cprintf("I am the parent. Forking the child...\n");
12 if ((env
= fork()) == 0) {
13 cprintf("I am the child. Spinning...\n");
18 cprintf("I am the parent. Running the child...\n");
28 cprintf("I am the parent. Killing the child...\n");