SIGNAL.DEF 1.9 KB

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