debugging prints

This commit is contained in:
rsc 2007-09-26 23:24:23 +00:00
parent d5596cd61d
commit 56c1a151d2

View file

@ -256,6 +256,7 @@ preempt(void)
int pid1, pid2, pid3; int pid1, pid2, pid3;
int pfds[2]; int pfds[2];
printf(1, "preempt: ");
pid1 = fork(); pid1 = fork();
if(pid1 == 0) if(pid1 == 0)
for(;;) for(;;)
@ -283,9 +284,11 @@ preempt(void)
return; return;
} }
close(pfds[0]); close(pfds[0]);
printf(1, "kill... ");
kill(pid1); kill(pid1);
kill(pid2); kill(pid2);
kill(pid3); kill(pid3);
printf(1, "wait... ");
wait(); wait();
wait(); wait();
wait(); wait();