3
{ Program to demonstrate the Fork and WaitPidfunction. }
7
Var PID, ExitStatus : Longint;
10
Writeln ('Spawning a child');
14
Writeln ('Hello From the Child !!');
15
Writeln ('Exiting with exit status 1 !');
20
Writeln ('Spawned child with PID : ',PID);
21
WaitPid (PID,@ExitStatus,0);
22
Writeln ('Child exited with status : ',ExitStatus shr 8);