Skip to content

Commit a82ca35

Browse files
committed
umask
1 parent a14dd59 commit a82ca35

File tree

1 file changed

+9
-0
lines changed
  • crates/vm/src/stdlib

1 file changed

+9
-0
lines changed

crates/vm/src/stdlib/nt.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,15 @@ pub(crate) mod module {
475475
Ok(())
476476
}
477477

478+
unsafe extern "C" {
479+
fn _umask(mask: i32) -> i32;
480+
}
481+
482+
#[pyfunction]
483+
fn umask(mask: i32) -> i32 {
484+
unsafe { _umask(mask) }
485+
}
486+
478487
pub(crate) fn support_funcs() -> Vec<SupportFunc> {
479488
Vec::new()
480489
}

0 commit comments

Comments
 (0)