3
{ Program to demonstrate the Signal function.}
6
do a kill -USR1 pid from another terminal to see what happens.
7
replace pid with the real pid of this program.
8
You can get this pid by running 'ps'.
13
Procedure DoSig(sig : cint);cdecl;
16
writeln('Receiving signal: ',sig);
20
if fpSignal(SigUsr1,SignalHandler(@DoSig))=signalhandler(SIG_ERR) then
22
writeln('Error: ',fpGetErrno,'.');
25
Writeln ('Send USR1 signal or press <ENTER> to exit');