mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-09-15 03:26:18 +00:00
tail: remove unused redox platform
This commit is contained in:
parent
3601eaf176
commit
ed6a9d4c57
2 changed files with 0 additions and 31 deletions
|
@ -14,14 +14,8 @@ pub use self::unix::{stdin_is_pipe_or_fifo, supports_pid_checks, Pid, ProcessChe
|
|||
#[cfg(windows)]
|
||||
pub use self::windows::{supports_pid_checks, Pid, ProcessChecker};
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
pub use self::redox::{supports_pid_checks, Pid, ProcessChecker};
|
||||
|
||||
#[cfg(unix)]
|
||||
mod unix;
|
||||
|
||||
#[cfg(windows)]
|
||||
mod windows;
|
||||
|
||||
#[cfg(target_os = "redox")]
|
||||
mod redox;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
// spell-checker:ignore (ToDO) ENOSYS EPERM
|
||||
|
||||
use self::syscall::{Error, ENOSYS, EPERM};
|
||||
|
||||
pub type Pid = usize;
|
||||
|
||||
pub struct ProcessChecker {
|
||||
pid: self::Pid,
|
||||
}
|
||||
|
||||
impl ProcessChecker {
|
||||
pub fn new(process_id: self::Pid) -> ProcessChecker {
|
||||
ProcessChecker { pid: process_id }
|
||||
}
|
||||
|
||||
// Borrowing mutably to be aligned with Windows implementation
|
||||
pub fn is_dead(&mut self) -> bool {
|
||||
let res = syscall::kill(self.pid, 0);
|
||||
res != Ok(0) && res != Err(Error::new(EPERM))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn supports_pid_checks(pid: self::Pid) -> bool {
|
||||
true
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue