Enum unshare::Error
[−]
[src]
pub enum Error { InvalidPath, UnknownError, CreatePipe(i32), Fork(i32), Exec(i32), Chdir(i32), ParentDeathSignal(i32), PipeError(i32), WaitError(i32), StdioError(i32), SetUser(i32), ChangeRoot(i32), SetIdMap(i32), SetPGid(i32), }
Variants
InvalidPath
Invalid path somewhere when running command. Presumably has embedded nulls.
Frankly, this error should not happen when running process. We just
keep it here in case nix
returns this error, which should not happen.
UnknownError
Some invalid error code received from child application
CreatePipe(i32)
Error happened when we were trying to create pipe. The pipes used for
two purposes: (a) for the process's stdio (Stdio::pipe()
or
Stdio::null()
), (b) internally to wake up child process and return
error back to the parent.
Fork(i32)
Error when forking/cloning process
Exec(i32)
Error when running execve() systemcall
Chdir(i32)
Error when setting working directory specified by user
ParentDeathSignal(i32)
Unable to set death signal (probably signal number invalid)
PipeError(i32)
Error reading/writing through one of the two signal pipes
WaitError(i32)
Error waiting for process (for some functions only, for example
Command::status()
). It probably means someone already waited for
the process, for example it might be other thread, or signal handler.
StdioError(i32)
Error setting up stdio for process
SetUser(i32)
Could not set supplementary groups, group id or user id for the process
ChangeRoot(i32)
Error changing root, it explains chroot
, pivot_root
system calls
and setting working directory inside new root. Also includes unmounting
old file system for pivot_root case.
SetIdMap(i32)
Error setting uid or gid map. May be either problem running
newuidmap
/newgidmap
command or writing the mapping file directly
SetPGid(i32)
Error when calling setpgid function
Methods
impl Error
[src]
fn raw_os_error(&self) -> Option<i32>
Similarly to io::Error
returns bare error code
Trait Implementations
impl Clone for Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Error
[src]
impl StdError for Error
[src]
fn description(&self) -> &'static str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0
The lower-level cause of this error, if any. Read more