home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / mntinc25.zoo / signal.h < prev    next >
C/C++ Source or Header  |  1992-09-05  |  3KB  |  85 lines

  1. #ifndef _SIGNAL_H
  2. #define _SIGNAL_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12.  
  13. #define    NSIG        31        /* number of signals recognized */
  14.  
  15. #define    SIGNULL        0        /* not really a signal */
  16. #define SIGHUP        1        /* hangup signal */
  17. #define SIGINT        2        /* sent by ^C */
  18. #define SIGQUIT        3        /* quit signal */
  19. #define SIGILL        4        /* illegal instruction */
  20. #define SIGTRAP        5        /* trace trap */
  21. #define SIGABRT        6        /* abort signal */
  22. # define SIGIOT SIGABRT
  23. #define SIGPRIV        7        /* privilege violation */
  24. # define SIGEMT SIGPRIV
  25. #define SIGFPE        8        /* divide by zero */
  26. #define SIGKILL        9        /* cannot be ignored */
  27. #define SIGBUS        10        /* bus error */
  28. #define SIGSEGV        11        /* illegal memory reference */
  29. #define SIGSYS        12        /* bad argument to a system call */
  30. #define SIGPIPE        13        /* broken pipe */
  31. #define SIGALRM        14        /* alarm clock */
  32. #define SIGTERM        15        /* software termination signal */
  33.  
  34. #define SIGURG        16        /* urgent condition on I/O channel */
  35. #define SIGSTOP        17        /* stop signal not from terminal */
  36. #define SIGTSTP        18        /* stop signal from terminal */
  37. #define SIGCONT        19        /* continue stopped process */
  38. #define SIGCHLD        20        /* child stopped or exited */
  39. #define SIGTTIN        21        /* read by background process */
  40. #define SIGTTOU        22        /* write by background process */
  41. #define SIGIO        23        /* I/O possible on a descriptor */
  42. #define SIGXCPU        24        /* CPU time exhausted */
  43. #define SIGXFSZ        25        /* file size limited exceeded */
  44. #define SIGVTALRM    26        /* virtual timer alarm */
  45. #define SIGPROF        27        /* profiling timer expired */
  46. #define SIGWINCH    28        /* window size changed */
  47. #define SIGUSR1        29        /* user signal 1 */
  48. #define SIGUSR2        30        /* user signal 2 */
  49.  
  50. typedef void __CDECL (*__Sigfunc) __PROTO((int signum));
  51. typedef short sig_atomic_t;
  52.  
  53. #define       SIG_DFL    ((__Sigfunc)0L)
  54. #define       SIG_IGN    ((__Sigfunc)1L)
  55. #define       SIG_ERR    ((__Sigfunc)-1L)
  56.  
  57. __EXTERN __Sigfunc    signal    __PROTO((int sig, __Sigfunc func));
  58. __EXTERN int        raise    __PROTO((int sig));
  59.  
  60. #ifdef __MINT__
  61. # ifndef __STRICT_ANSI__
  62. struct sigaction {
  63.     __Sigfunc    sa_handler;    /* pointer to signal handler */
  64.     long        sa_mask;    /* additional signals masked during delivery */
  65. /* pain here... POSIX forces us to use int, we would prefer short */
  66.     int         sa_flags;    /* signal specific flags */
  67. /* signal flags */
  68. #define SA_NOCLDSTOP    1    /* don't send SIGCHLD when they stop */
  69. };
  70.  
  71. __EXTERN long    sigsetmask __PROTO((long mask));
  72. __EXTERN long    sigblock   __PROTO((long mask));
  73. __EXTERN int    sigaction  __PROTO((int, const struct sigaction *,
  74.                 struct sigaction *));
  75. /* a mask for signals */
  76. #define sigmask(sig) (1L << (sig))
  77. # endif /* __STRICT_ANSI__ */
  78. #endif /* __MINT__ */
  79.  
  80. #ifdef __cplusplus
  81. }
  82. #endif
  83.  
  84. #endif /* _SIGNAL_H */
  85.