-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5cb41a
commit 8e1770b
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ mod kill; | |
mod pid; | ||
mod sid; | ||
mod uid; | ||
mod umask; | ||
mod wait; | ||
|
||
// this entire module is | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use libc::mode_t; | ||
use rustix::fs::Mode; | ||
|
||
#[no_mangle] | ||
unsafe extern "C" fn umask(mask: mode_t) -> mode_t { | ||
libc!(libc::umask(mask)); | ||
rustix::process::umask(Mode::from_raw_mode(mask)).as_raw_mode() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters