home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / GNU / sas_unix_lib.lha / unix / include / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-08-10  |  1.8 KB  |  50 lines

  1. #ifndef _SIGNAL_H
  2. #define _SIGNAL_H
  3.  
  4. #define NSIG 32            /* We define lots of signals (though most are never
  5.                    generated) */
  6.  
  7. /* Signal number definitions */
  8. /* Those which can be generated other than by kill are described with
  9.     <name>, amiga: <cause> */
  10.    
  11.  
  12. #define SIGHUP 1        /* hangup */
  13. #define SIGINT 2        /* interrupt, amiga: ctrl-c */
  14. #define SIGQUIT 3        /* quit, amiga: ctrl-d */
  15. #define SIGILL 4        /* illegal instruction */
  16. #define SIGTRAP 5        /* trace trap */
  17. #define SIGIOT 6        /* abort, amiga: abort() called */
  18. #define SIGEMT 7        /* emulator trap */
  19. #define SIGFPE 8        /* arithmetic exception, amiga: arith op */
  20. #define SIGKILL 9        /* kill */
  21. #define SIGBUS 10        /* bus error */
  22. #define SIGSEGV 11        /* segmentation violation */
  23. #define SIGSYS 12        /* bad argument to system call */
  24. #define SIGPIPE 13        /* write on pipe or socket with no reader,
  25.                    amiga: generated for 'pipe's or 'sktpair's */
  26. #define SIGALRM 14        /* alarm clock, amiga: see alarm */
  27. #define SIGTERM 15        /* software termination */
  28. #define SIGURG 16        /* urgent condition on socket */
  29. /* SIGSTOP, SIGTSTP, SIGCONT, SIGTTIN, SIGTTOU undefined to avoid creating the
  30.    belief that we support stopped processes */
  31. #define SIGCHLD 20        /* child status has changed */
  32. #define SIGIO 23        /* I/O possible on a descriptor */
  33. /* Less usual signals: SIGXCPU, SIGXFSZ, SIGVTALARM, SIGPROF, SIGLOST not defined */
  34. #define SIGWINCH 28        /* window changed */
  35. #define SIGUSR1 30        /* user-defined signal 1 */
  36. #define SIGUSR2 31        /* user-defined signal 2 */
  37.  
  38. #define SIG_IGN (void *)0
  39. #define SIG_DFL (void *)1
  40.  
  41. void (*signal(int sig,void (*fn)(int)))(int);
  42. long sigsetmask(long mask);
  43.  
  44. /* Only kill(getpid(), sig) works */
  45. /* Also, getpid() is a unique number for this process */
  46. int getpid(void);
  47. int kill(int pid, int sig);
  48.  
  49. #endif
  50.