signal.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef __GBLIBC_SIGNAL_H_
  2. #define __GBLIBC_SIGNAL_H_
  3. #include <sys/types.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define SIGHUP 1
  8. #define SIGINT 2
  9. #define SIGQUIT 3
  10. #define SIGILL 4
  11. #define SIGTRAP 5
  12. #define SIGABRT 6
  13. #define SIGIOT SIGABRT
  14. #define SIGBUS 7
  15. #define SIGFPE 8
  16. #define SIGKILL 9
  17. #define SIGUSR1 10
  18. #define SIGSEGV 11
  19. #define SIGUSR2 12
  20. #define SIGPIPE 13
  21. #define SIGALRM 14
  22. #define SIGTERM 15
  23. #define SIGSTKFLT 16
  24. #define SIGCHLD 17
  25. #define SIGCONT 18
  26. #define SIGSTOP 19
  27. #define SIGTSTP 20
  28. #define SIGTTIN 21
  29. #define SIGTTOU 22
  30. #define SIGURG 23
  31. #define SIGXCPU 24
  32. #define SIGXFSZ 25
  33. #define SIGVTALRM 26
  34. #define SIGPROF 27
  35. #define SIGWINCH 28
  36. #define SIGIO 29
  37. #define SIGPOLL 29
  38. #define SIGPWR 30
  39. #define SIGSYS 31
  40. #define SIGUNUSED SIGSYS
  41. #define SIGRTMIN 32
  42. #define SIGRTMAX 64
  43. #define SIG_BLOCK 0
  44. #define SIG_UNBLOCK 1
  45. #define SIG_SETMASK 2
  46. #define SA_RESTORER 0x04000000
  47. #define SA_ONSTACK 0x08000000
  48. #define SA_RESTART 0x10000000
  49. #define SA_NODEFER 0x40000000
  50. #define SIG_DFL ((sighandler_t)0)
  51. #define SIG_IGN ((sighandler_t)1)
  52. typedef void (*sighandler_t)(int);
  53. typedef void (*sigrestorer_t)(void);
  54. int kill(pid_t pid, int sig);
  55. int raise(int sig);
  56. #ifdef __cplusplus
  57. }
  58. #endif
  59. #endif