home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / lan / soss.arj / INCLUDE / SIGNAL.H < prev    next >
C/C++ Source or Header  |  1991-04-11  |  3KB  |  77 lines

  1. /* Copyright 1986 by Carnegie Mellon */
  2. #ifndef    NSIG
  3. #define NSIG    32
  4.  
  5. #define    SIGHUP    1    /* hangup */
  6. #define    SIGINT    2    /* interrupt */
  7. #define    SIGQUIT    3    /* quit */
  8. #define    SIGILL    4    /* illegal instruction (not reset when caught) */
  9.  
  10. #define    SIGTRAP    5    /* trace trap (not reset when caught) */
  11. #define    SIGIOT    6    /* IOT instruction */
  12. #define    SIGEMT    7    /* EMT instruction */
  13. #define    SIGFPE    8    /* floating point exception */
  14. #define        K_INT_OVF_T 0x1        /* integer overflow */
  15. #define        K_INT_DIV_T 0x2        /* integer divide by zero */
  16. #define        K_FLT_OVF_T 0x3        /* floating overflow */
  17. #define        K_FLT_DIV_T 0x4        /* floating/decimal divide by zero */
  18. #define        K_FLT_UND_T 0x5        /* floating underflow */
  19. #define        K_DEC_OVF_T 0x6        /* decimal overflow */
  20. #define        K_SUB_RNG_T 0x7        /* subscript out of range */
  21. #define        K_FLT_OVF_F 0x8        /* floating overflow fault */
  22. #define        K_FLT_DIV_F 0x9        /* divide by zero floating fault */
  23. #define        K_FLT_UND_F 0xa        /* floating underflow fault */
  24. #define    SIGKILL    9    /* kill (cannot be caught or ignored) */
  25. #define    SIGBUS    10    /* bus error */
  26. #define    SIGSEGV    11    /* segmentation violation */
  27. #define    SIGSYS    12    /* bad argument to system call */
  28. #define    SIGPIPE    13    /* write on a pipe with no one to read it */
  29. #define    SIGALRM    14    /* alarm clock */
  30. #define    SIGTERM    15    /* software termination signal from kill */
  31.  
  32. /* these signals are not yet supported on nunix */
  33. /*#define    SIGSTOP    17    /* sendable stop signal not from tty */
  34. /*#define    SIGTSTP    18    /* stop signal from tty */
  35. /*#define    SIGCONT    19    /* continue a stopped process */
  36. /*#define    SIGCHLD    20    /* to parent on child stop or exit */
  37. /*#define    SIGTTIN    21    /* to readers pgrp upon background tty read */
  38. /*#define    SIGTTOU    22    /* like TTIN for output if (tp->t_local<OSTOP) */
  39. /*#define    SIGTINT    23    /* to pgrp on every input character if LINTRUP */
  40. /*#define    SIGXCPU    24    /* exceeded CPU time limit */
  41. /*#define    SIGXFSZ    25    /* exceeded file size limit */
  42.  
  43. #define SIGSTAT 26    /* status update requested */
  44. #define SIGMOUS 27    /* mouse interrupt */
  45.  
  46. #ifndef KERNEL
  47. int    (*signal())();
  48. #endif
  49.  
  50. #define    BADSIG        (int (*)())-1
  51. #define    SIG_DFL        (int (*)())0
  52. #define    SIG_IGN        (int (*)())1
  53. #ifdef KERNEL
  54. #define    SIG_CATCH    (int (*)())2
  55. #endif
  56. #define    SIG_HOLD    (int (*)())3
  57.  
  58. #define    SIGISDEFER(x)    (((int)(x) & 1) != 0)
  59. #define    SIGUNDEFER(x)    (int (*)())((int)(x) &~ 1)
  60. #define    DEFERSIG(x)    (int (*)())((int)(x) | 1)
  61.  
  62. #define    SIGNUMMASK    0377        /* to extract pure signal number */
  63. #define    SIGDOPAUSE    0400        /* do pause after setting action */
  64. #define    SIGDORTI    01000        /* do ret+rti after setting action */
  65. #endif
  66.  
  67. /* old fashioned unix stuff */
  68. #ifdef KERNEL
  69. #define SIGINS    SIGILL
  70. #define SIGTRC    SIGTRAP
  71. #define SIGFPT    SIGFPE
  72. #define SIGKIL    SIGKILL
  73. #define SIGSEG    SIGSEGV
  74. #define SIGCLK    SIGALRM
  75. #define SIGTRM    SIGTERM
  76. #endif
  77.