CSIGNAL.DEF 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. (* Release 3.10 *)
  2. (*-------------------------------------------------------------------------*
  3. * *
  4. * CSIGNAL.DEF - Modula-2 interface to SIGNAL.H *
  5. * *
  6. * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
  7. * All Rights Reserved *
  8. * *
  9. *--------------------------------------------------------------------------*)
  10. (*# project("#set tsc='on'") *)
  11. (*# call(o_a_size=>off, o_a_copy=>off, c_conv=>on, result_optional=>on) *)
  12. (*# module(implementation=>off, init_code=>off) *)
  13. (*# name(prefix=>c) *)
  14. DEFINITION MODULE csignal;
  15. CONST
  16. NSIG = 23; (* maximum signal number + 1 *)
  17. SIGINT = 2; (* interrupt - corresponds to DOS 3.x int 23H *)
  18. SIGILL = 4; (* illegal opcode *)
  19. SIGFPE = 8; (* floating point error *)
  20. SIGSEGV = 11; (* segment violation *)
  21. SIGTERM = 15; (* software termination signal from kill *)
  22. SIGUSR1 = 16; (* user defined signal 1 *)
  23. SIGUSR2 = 17; (* user defined signal 2 *)
  24. SIGUSR3 = 20; (* user defined signal 3 *)
  25. SIGABRT = 22; (* abnormal termination triggered by abort call *)
  26. TYPE
  27. SigProc = PROCEDURE(INTEGER);
  28. CONST
  29. SIG_DFL = 0;
  30. SIG_IGN = 1;
  31. SIG_SGE = 3;
  32. SIG_ACK = 4;
  33. SIG_ERR = -1;
  34. PROCEDURE signal(SigNo: INTEGER; P: SigProc): SigProc;
  35. PROCEDURE raise(_sig: INTEGER);
  36. END csignal.
  37.