We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aff0e3c commit c57b8fbCopy full SHA for c57b8fb
vm/src/stdlib/os.rs
@@ -2355,6 +2355,18 @@ mod posix {
2355
)
2356
}
2357
2358
+ #[pyfunction]
2359
+ fn nice(increment: i32, vm: &VirtualMachine) -> PyResult<i32> {
2360
+ use nix::errno::{errno, Errno};
2361
+ Errno::clear();
2362
+ let res = unsafe { libc::nice(increment) };
2363
+ if res == -1 && errno() != 0 {
2364
+ Err(errno_err(vm))
2365
+ } else {
2366
+ Ok(res)
2367
+ }
2368
2369
+
2370
#[pyfunction]
2371
fn get_inheritable(fd: RawFd, vm: &VirtualMachine) -> PyResult<bool> {
2372
use nix::fcntl::fcntl;
0 commit comments