signal.pxd 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # 7.14 Signal handling <signal.h>
  2. from posix.types cimport pid_t, sigset_t, uid_t
  3. cdef extern from "<signal.h>" nogil:
  4. cdef union sigval:
  5. int sival_int
  6. void *sival_ptr
  7. cdef struct sigevent:
  8. int sigev_notify
  9. int sigev_signo
  10. sigval sigev_value
  11. void sigev_notify_function(sigval)
  12. ctypedef struct siginfo_t:
  13. int si_signo
  14. int si_code
  15. int si_errno
  16. pid_t si_pid
  17. uid_t si_uid
  18. void *si_addr
  19. int si_status
  20. long si_band
  21. sigval si_value
  22. cdef struct sigaction_t "sigaction":
  23. void sa_handler(int)
  24. void sa_sigaction(int, siginfo_t *, void *)
  25. sigset_t sa_mask
  26. int sa_flags
  27. ctypedef struct stack_t:
  28. void *ss_sp
  29. int ss_flags
  30. size_t ss_size
  31. enum: SA_NOCLDSTOP
  32. enum: SIG_BLOCK
  33. enum: SIG_UNBLOCK
  34. enum: SIG_SETMASK
  35. enum: SA_ONSTACK
  36. enum: SA_RESETHAND
  37. enum: SA_RESTART
  38. enum: SA_SIGINFO
  39. enum: SA_NOCLDWAIT
  40. enum: SA_NODEFER
  41. enum: SS_ONSTACK
  42. enum: SS_DISABLE
  43. enum: MINSIGSTKSZ
  44. enum: SIGSTKSZ
  45. enum: SIGEV_NONE
  46. enum: SIGEV_SIGNAL
  47. enum: SIGEV_THREAD
  48. enum: SIGEV_THREAD_ID
  49. int kill (pid_t, int)
  50. int killpg (pid_t, int)
  51. int sigaction (int, const sigaction_t *, sigaction_t *)
  52. int sigpending (sigset_t *)
  53. int sigprocmask (int, const sigset_t *, sigset_t *)
  54. int sigsuspend (const sigset_t *)
  55. int sigaddset (sigset_t *, int)
  56. int sigdelset (sigset_t *, int)
  57. int sigemptyset (sigset_t *)
  58. int sigfillset (sigset_t *)
  59. int sigismember (const sigset_t *, int)
  60. int sigaltstack(const stack_t *, stack_t *)