diff --git a/src/uu/renice/src/renice.rs b/src/uu/renice/src/renice.rs index 2adebae..d8ae323 100644 --- a/src/uu/renice/src/renice.rs +++ b/src/uu/renice/src/renice.rs @@ -3,14 +3,16 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +use clap::{crate_version, Arg, Command}; +#[cfg(not(windows))] use libc::PRIO_PROCESS; use std::env; use std::io::Error; use std::process; use uucore::{error::UResult, format_usage, help_about, help_usage}; + const ABOUT: &str = help_about!("renice.md"); const USAGE: &str = help_usage!("renice.md"); -use clap::{crate_version, Arg, Command}; #[uucore::main] pub fn uumain(args: impl uucore::Args) -> UResult<()> { @@ -28,6 +30,8 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> { process::exit(1); }); + // TODO: implement functionality on windows + #[cfg(not(windows))] if unsafe { libc::setpriority(PRIO_PROCESS, pid.try_into().unwrap(), nice_value) } == -1 { eprintln!("Failed to set nice value: {}", Error::last_os_error()); process::exit(1);