File: Signals.md

package info (click to toggle)
mocka 9605-1
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 2,488 kB
  • ctags: 105
  • sloc: asm: 452; makefile: 198; sh: 124; ansic: 14
file content (64 lines) | stat: -rw-r--r-- 3,045 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
(******************************************************************************)
(* Copyright (c) 1988 by GMD Karlruhe, Germany				      *)
(* Gesellschaft fuer Mathematik und Datenverarbeitung			      *)
(* (German National Research Center for Computer Science)		      *)
(* Forschungsstelle fuer Programmstrukturen an Universitaet Karlsruhe	      *)
(* All rights reserved.							      *)
(* Don't modify this file under any circumstances			      *)
(******************************************************************************)

FOREIGN MODULE Signals;

  FROM SysLib IMPORT
     SIGNED;
  
  CONST
     SIGHUP    = 1;      (* hangup *)
     SIGINT    = 2;      (* interrupt *)
     SIGQUIT   = 3;      (* quit *)
     SIGILL    = 4;      (* illegal instruction *)
     SIGTRAP   = 5;      (* trace or breakpoint *)
     SIGIOT    = 6;      (* IOT instruction *)
     SIGABRT   = 6;      (* abort *)
     SIGBUS    = 7;      (* linux: bus error *)
     SIGFPE    = 8;      (* floating exception *)
     SIGKILL   = 9;      (* kill, uncatchable termination *)
     SIGUSR1   = 10;     (* linux: user defined signal 1 *)
     SIGSEGV   = 11;     (* segmentation violation *)
     SIGUSR2   = 12;     (* linux: user defined signal 2 *)
     SIGPIPE   = 13;     (* end of pipe *)
     SIGALRM   = 14;     (* alarm clock *)
     SIGTERM   = 15;     (* software termination signal *)
     SIGSTKFLT = 16;	 (* linux: stack fault *)
     SIGCHLD   = 17;     (* linux: to parent on child stop or exit *)
     SIGCONT   = 18;     (* linux: continue a stopped process *)
     SIGSTOP   = 19;     (* linux: sendable stop signal not from tty *)
     SIGTSTP   = 20;     (* linux: stop signal from tty *)
     SIGTTIN   = 21;     (* to readers pgrp upon background tty read *)
     SIGTTOU   = 22;     (* like TTIN for output *)
     SIGURG    = 23;     (* linux: urgent condition on IO channel *)
     SIGXCPU   = 24;     (* exceeded CPU time limit *)
     SIGXFSZ   = 25;     (* exceeded file size limit *)
     SIGVTALRM = 26;	 (* virtual time alarm *)
     SIGPROF   = 27;     (* profiling time alarm *)
     SIGWINCH  = 28;	 (* window changed *)
     SIGIO     = 29;     (* linux: input/output possible signal *)
     SIGPOLL   = 29;     (* linux: System V name for SIGIO *)
     SIGLOST   = 29;     (* resource lost (eg, record-lock lost) *)
     SIGPWR    = 30;     (* linux: ? *)
     SIGUNUSED = 31;	 (* linux: unused *)

  TYPE
     SigNum     = SIGNED [1 .. 31];
     SigHandler = PROCEDURE (SigNum);

  PROCEDURE signal (sig  : SigNum; func : SigHandler) : SigHandler;
     (* Defines the handler procedure for the specified signal 'sig' *)
     (* as 'func'. Returns the previous (or initial) handler procedure *)
     (* of the particular signal. Upon recept of the signal 'sig' the *)
     (* handler procedure 'func' is executed. Before entering 'func', *)
     (* the handler procedure of 'sig' is reset to it's initial value. *)
     (* Upon return from 'func', execution continues at the interrupted *)
     (* point. *)

END Signals.