| author | |
| committer | |
| log | a3703745eb21923b96e807b9163d303b8e4447b7 |
| tree | f926020d9b528a79b825677b44c225295c06bc18 |
| parent | 9d1fb98fa87b09838310ba4ebf988617ed49a1c9 |
| signature | Signed by PGP key 4AEE18F83AFDEB23 |
2 files changed, 13 insertions(+), 0 deletions(-)
lib/std/os/bits/linux.zig+9| ... | ... | @@ -204,6 +204,15 @@ pub const WEXITED = 4; |
| 204 | 204 | pub const WCONTINUED = 8; |
| 205 | 205 | pub const WNOWAIT = 0x1000000; |
| 206 | 206 | |
| 207 | // waitid id types | |
| 208 | pub const P = enum(c_uint) { | |
| 209 | ALL = 0, | |
| 210 | PID = 1, | |
| 211 | PGID = 2, | |
| 212 | PIDFD = 3, | |
| 213 | _, | |
| 214 | }; | |
| 215 | ||
| 207 | 216 | pub usingnamespace if (is_mips) |
| 208 | 217 | struct { |
| 209 | 218 | pub const SA_NOCLDSTOP = 1; |
lib/std/os/linux.zig+4| ... | ... | @@ -710,6 +710,10 @@ pub fn waitpid(pid: pid_t, status: *u32, flags: u32) usize { |
| 710 | 710 | return syscall4(.wait4, @bitCast(usize, @as(isize, pid)), @ptrToInt(status), flags, 0); |
| 711 | 711 | } |
| 712 | 712 | |
| 713 | pub fn waitid(id_type: P, id: i32, infop: *siginfo_t, flags: u32) usize { | |
| 714 | return syscall5(.waitid, @enumToInt(id_type), @bitCast(usize, @as(isize, id)), @ptrToInt(infop), flags, 0); | |
| 715 | } | |
| 716 | ||
| 713 | 717 | pub fn fcntl(fd: fd_t, cmd: i32, arg: usize) usize { |
| 714 | 718 | return syscall3(.fcntl, @bitCast(usize, @as(isize, fd)), @bitCast(usize, @as(isize, cmd)), arg); |
| 715 | 719 | } |