signal.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. struct __siginfo
  2. {
  3. int si_signo;
  4. int si_errno;
  5. int si_code;
  6. union
  7. {
  8. char __pad[128 - 3*sizeof(int)];
  9. struct {
  10. pid_t si_pid;
  11. uid_t si_uid;
  12. union sigval si_sigval;
  13. } __rt;
  14. struct {
  15. unsigned int si_timer1;
  16. unsigned int si_timer2;
  17. } __timer;
  18. struct {
  19. pid_t si_pid;
  20. uid_t si_uid;
  21. int si_status;
  22. clock_t si_utime;
  23. clock_t si_stime;
  24. } __sigchld;
  25. struct {
  26. void *si_addr;
  27. } __sigfault;
  28. struct {
  29. long int si_band;
  30. int si_fd;
  31. } __sigpoll;
  32. } __si_fields;
  33. };
  34. #define si_pid __si_fields.__sigchld.si_pid
  35. #define si_uid __si_fields.__sigchld.si_uid
  36. #define si_status __si_fields.__sigchld.si_status
  37. #define si_utime __si_fields.__sigchld.si_utime
  38. #define si_stime __si_fields.__sigchld.si_stime
  39. #define si_value __si_fields.__rt.si_sigval
  40. #define si_addr __si_fields.__sigfault.si_addr
  41. #define si_band __si_fields.__sigpoll.si_band
  42. #define SA_NOCLDSTOP 1
  43. #define SA_NOCLDWAIT 2
  44. #define SA_SIGINFO 4
  45. #define SA_ONSTACK 0x08000000
  46. #define SA_RESTART 0x10000000
  47. #define SA_NODEFER 0x40000000
  48. #define SA_RESETHAND 0x80000000
  49. #define SS_ONSTACK 1
  50. #define SS_DISABLE 2
  51. #define SIG_BLOCK 0
  52. #define SIG_UNBLOCK 1
  53. #define SIG_SETMASK 2
  54. #define SIG_ERR ((void (*)(int))-1)
  55. #define SIG_DFL ((void (*)(int)) 0)
  56. #define SIG_IGN ((void (*)(int)) 1)
  57. #define SIG_HOLD ((void (*)(int)) 2)
  58. #define NSIG 64
  59. #define SIGHUP 1
  60. #define SIGINT 2
  61. #define SIGQUIT 3
  62. #define SIGILL 4
  63. #define SIGTRAP 5
  64. #define SIGABRT 6
  65. #define SIGBUS 7
  66. #define SIGFPE 8
  67. #define SIGKILL 9
  68. #define SIGUSR1 10
  69. #define SIGSEGV 11
  70. #define SIGUSR2 12
  71. #define SIGPIPE 13
  72. #define SIGALRM 14
  73. #define SIGTERM 15
  74. #define SIGSTKFLT 16
  75. #define SIGCHLD 17
  76. #define SIGCONT 18
  77. #define SIGSTOP 19
  78. #define SIGTSTP 20
  79. #define SIGTTIN 21
  80. #define SIGTTOU 22
  81. #define SIGURG 23
  82. #define SIGXCPU 24
  83. #define SIGXFSZ 25
  84. #define SIGVTALRM 26
  85. #define SIGPROF 27
  86. #define SIGWINCH 28
  87. #define SIGIO 29
  88. #define SIGPOLL 29
  89. #define SIGPWR 30
  90. #define SIGSYS 31
  91. #define SIGUNUSED SIGSYS