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