| ... | @@ -758,6 +758,43 @@ pub const Sigaction = extern struct { | ... | @@ -758,6 +758,43 @@ pub const Sigaction = extern struct { |
| 758 | sa_mask: sigset_t, | 758 | sa_mask: sigset_t, |
| 759 | }; | 759 | }; |
| 760 | | 760 | |
| | 761 | pub const __siginfo = extern struct { |
| | 762 | si_signo: c_int, |
| | 763 | si_errno: c_int, |
| | 764 | si_code: c_int, |
| | 765 | si_pid: pid_t, |
| | 766 | si_uid: uid_t, |
| | 767 | si_status: c_int, |
| | 768 | si_addr: ?*c_void, |
| | 769 | si_value: sigval, |
| | 770 | _reason: extern union { |
| | 771 | _fault: extern struct { |
| | 772 | _trapno: c_int, |
| | 773 | }, |
| | 774 | _timer: extern struct { |
| | 775 | _timerid: c_int, |
| | 776 | _overrun: c_int, |
| | 777 | }, |
| | 778 | _mesgq: extern struct { |
| | 779 | _mqd: c_int, |
| | 780 | }, |
| | 781 | _poll: extern struct { |
| | 782 | _band: c_long, |
| | 783 | }, |
| | 784 | __spare__: extern struct { |
| | 785 | __spare1__: c_long, |
| | 786 | __spare2__: [7]c_int, |
| | 787 | }, |
| | 788 | }, |
| | 789 | }; |
| | 790 | |
| | 791 | pub const sigval = extern union { |
| | 792 | sival_int: c_int, |
| | 793 | sival_ptr: ?*c_void, |
| | 794 | sigval_int: c_int, |
| | 795 | sigval_ptr: ?*c_void, |
| | 796 | }; |
| | 797 | |
| 761 | pub const _SIG_WORDS = 4; | 798 | pub const _SIG_WORDS = 4; |
| 762 | pub const _SIG_MAXSIG = 128; | 799 | pub const _SIG_MAXSIG = 128; |
| 763 | | 800 | |
| ... | @@ -778,6 +815,8 @@ pub const sigset_t = extern struct { | ... | @@ -778,6 +815,8 @@ pub const sigset_t = extern struct { |
| 778 | __bits: [_SIG_WORDS]u32, | 815 | __bits: [_SIG_WORDS]u32, |
| 779 | }; | 816 | }; |
| 780 | | 817 | |
| | 818 | pub const empty_sigset = sigset_t{ .__bits = [_]u32{0} ** _SIG_WORDS }; |
| | 819 | |
| 781 | pub const EPERM = 1; // Operation not permitted | 820 | pub const EPERM = 1; // Operation not permitted |
| 782 | pub const ENOENT = 2; // No such file or directory | 821 | pub const ENOENT = 2; // No such file or directory |
| 783 | pub const ESRCH = 3; // No such process | 822 | pub const ESRCH = 3; // No such process |