1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: add getuid and geteuid (#10002)

This commit is contained in:
Miccah
2021-05-05 06:20:11 -05:00
committed by GitHub
parent 4bc56dc0a2
commit 12c3f85507
2 changed files with 14 additions and 0 deletions

View File

@@ -332,6 +332,16 @@ pub fn getpid() int {
return C.getpid()
}
[inline]
pub fn getuid() int {
return C.getuid()
}
[inline]
pub fn geteuid() int {
return C.geteuid()
}
// Turns the given bit on or off, depending on the `enable` parameter
pub fn posix_set_permission_bit(path_s string, mode u32, enable bool) {
mut s := C.stat{}