pub struct Sys {}
Trait Implementations§
Source§impl Platform for Sys
impl Platform for Sys
Source§fn get_term_settings(terminal: UnixFileDesc) -> Result<UnixTermSettings, Error>
fn get_term_settings(terminal: UnixFileDesc) -> Result<UnixTermSettings, Error>
If terminal is a terminal then get it’s term settings.
Source§fn restore_terminal(
term_settings: &UnixTermSettings,
shell_pid: UnixPid,
) -> Result<(), Error>
fn restore_terminal( term_settings: &UnixTermSettings, shell_pid: UnixPid, ) -> Result<(), Error>
Restore terminal settings and put the shell back into the foreground.
Source§fn terminal_foreground(terminal: UnixFileDesc)
fn terminal_foreground(terminal: UnixFileDesc)
Put terminal in the foreground, loop until this succeeds. Used during shell startup.
Source§fn set_self_pgroup() -> Result<(), Error>
fn set_self_pgroup() -> Result<(), Error>
Puts the running process into its own process group. Do this during shell initialization.
Source§fn grab_terminal(terminal: UnixFileDesc) -> Result<(), Error>
fn grab_terminal(terminal: UnixFileDesc) -> Result<(), Error>
Grab control of terminal. Used for shell startup.
Source§fn anon_pipe() -> Result<(UnixFileDesc, UnixFileDesc), Error>
fn anon_pipe() -> Result<(UnixFileDesc, UnixFileDesc), Error>
Return the input and output file descriptors for an anonymous pipe.
Source§fn foreground_job(
job: &mut Job,
term_settings: &Option<UnixTermSettings>,
) -> Result<(), Error>
fn foreground_job( job: &mut Job, term_settings: &Option<UnixTermSettings>, ) -> Result<(), Error>
Move the job for job_num to te foreground.
Source§fn background_job(job: &mut Job) -> Result<(), Error>
fn background_job(job: &mut Job) -> Result<(), Error>
Move the job for job_num to te background and running (start a stopped job in the background).
Source§fn dup2_fd(
src_fd: UnixFileDesc,
dst_fd: UnixFileDesc,
) -> Result<UnixFileDesc, Error>
fn dup2_fd( src_fd: UnixFileDesc, dst_fd: UnixFileDesc, ) -> Result<UnixFileDesc, Error>
Duplicate a raw file descriptor to another file descriptor.
Source§fn gethostname() -> Option<OsString>
fn gethostname() -> Option<OsString>
Get the current machines hostname if available.
Source§fn current_uid() -> u32
fn current_uid() -> u32
Get current UID of the process.
Source§fn effective_uid() -> u32
fn effective_uid() -> u32
Get effective UID of the process.
type Pid = UnixPid
type FileDesc = UnixFileDesc
type TermSettings = UnixTermSettings
fn fork_run(run: &Run, job: &mut Job, jobs: &mut Jobs) -> Result<(), Error>
fn fork_exec( command: &CommandWithArgs, job: &mut Job, jobs: &mut Jobs, ) -> Result<(), Error>
fn try_wait_pid(pid: UnixPid, job: &mut Job) -> (bool, Option<i32>)
fn wait_job(job: &mut Job) -> Option<i32>
fn is_tty(terminal: UnixFileDesc) -> bool
fn set_rlimit(rlimit: RLimit, values: RLimitVals) -> Result<(), Error>
fn get_rlimit(rlimit: RLimit) -> Result<RLimitVals, Error>
Source§fn merge_and_set_umask(
current_umask: mode_t,
mask_string: &str,
) -> Result<mode_t, Error>
fn merge_and_set_umask( current_umask: mode_t, mask_string: &str, ) -> Result<mode_t, Error>
If mask_string is a mode string then merge it with umask and set the current umask.
If mask_string is an int then treat it as a umask and set the current umask (no merge)).
Source§fn get_and_clear_umask() -> mode_t
fn get_and_clear_umask() -> mode_t
Clears the current umask and returns the previous umask.
Auto Trait Implementations§
impl Freeze for Sys
impl RefUnwindSafe for Sys
impl Send for Sys
impl Sync for Sys
impl Unpin for Sys
impl UnwindSafe for Sys
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more