From 338a563380b3961b0dc57c678453723e15b7cde9 Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 10 Sep 1998 08:28:50 +0000 Subject: [PATCH] Forgot to add --- docs/linuxex/ex58.pp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs/linuxex/ex58.pp diff --git a/docs/linuxex/ex58.pp b/docs/linuxex/ex58.pp new file mode 100644 index 0000000000..d6b19cd0fb --- /dev/null +++ b/docs/linuxex/ex58.pp @@ -0,0 +1,28 @@ +Program example58; + +{ Program to demonstrate the Signal function.} + +{ +do a kill -USR1 pid from another terminal to see what happens. +replace pid with the real pid of this program. +You can get this pid by running 'ps'. +} + +uses Linux; + +Procedure DoSig(sig : Longint);cdecl; + +begin + writeln('Receiving signal: ',sig); +end; + +begin + SigNal(SigUsr1,@DoSig); + if LinuxError<>0 then + begin + writeln('Error: ',linuxerror,'.'); + halt(1); + end; + Writeln ('Send USR1 signal or press to exit'); + readln; +end.