~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to docs/olinuxex/ex65.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Program example64;
 
2
 
 
3
{ Program to demonstrate the SigRaise function.}
 
4
 
 
5
uses oldlinux;
 
6
 
 
7
Var
 
8
   oa,na : PSigActionRec;
 
9
 
 
10
Procedure DoSig(sig : Longint);cdecl;
 
11
 
 
12
begin
 
13
   writeln('Receiving signal: ',sig);
 
14
end;
 
15
 
 
16
begin
 
17
   new(na);
 
18
   new(oa);
 
19
   na^.handler.sh:=@DoSig;
 
20
   na^.Sa_Mask:=0;
 
21
   na^.Sa_Flags:=0;
 
22
   na^.Sa_Restorer:=Nil;
 
23
   SigAction(SigUsr1,na,oa);
 
24
   if LinuxError<>0 then
 
25
     begin
 
26
     writeln('Error: ',linuxerror,'.');
 
27
     halt(1);
 
28
     end;
 
29
   Writeln('Sending USR1 (',sigusr1,') signal to self.');
 
30
   SigRaise(sigusr1);
 
31
end.
 
 
b'\\ No newline at end of file'