diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-09-26 01:01:49 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-09-26 01:01:49 -0400 |
| commit | cba4a9ad4a149766c650e3f3d71435cef14867a3 (patch) | |
| tree | 2edcb1357482a548ae821109519118b51b1e5a0e /std/os/linux.zig | |
| parent | 79400bfdfd1e90cf3a4d09f32de965b13796a44d (diff) | |
| download | zig-cba4a9ad4a149766c650e3f3d71435cef14867a3.tar.gz zig-cba4a9ad4a149766c650e3f3d71435cef14867a3.zip | |
update std.os.ChildProcess API
* add std.os.ChildProcess.setUserName
* add std.os.getUserId
Diffstat (limited to 'std/os/linux.zig')
| -rw-r--r-- | std/os/linux.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/std/os/linux.zig b/std/os/linux.zig index ed082e1e96..16a368ffbe 100644 --- a/std/os/linux.zig +++ b/std/os/linux.zig @@ -480,6 +480,10 @@ pub fn nanosleep(req: &const timespec, rem: ?×pec) -> usize { arch.syscall2(arch.SYS_nanosleep, @ptrToInt(req), @ptrToInt(rem)) } +pub fn setuid(uid: u32) -> usize { + arch.syscall1(arch.SYS_setuid, uid) +} + pub fn sigprocmask(flags: u32, noalias set: &const sigset_t, noalias oldset: ?&sigset_t) -> usize { arch.syscall4(arch.SYS_rt_sigprocmask, flags, @ptrToInt(set), @ptrToInt(oldset), NSIG/8) } |
