c-scape 0.22.3

A libc bottom-half implementation in Rust
Documentation
1
2
3
4
5
6
7
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()
}