Command has mostly same API as
std::process::Command except where
is absolutely needed.
Command contains methods to configure linux namespaces,
chroots and more linux stuff.
We have diverged from
std::process::Command in the following
Error handling. Since sometimes we have long chains of system calls involved, we need to give user some way to find out which call failed with an error, so
io::Erroris not an option. We have
error::Errorclass which describes the error as precisely as possible
SIGKILLby default. I.e. child process will die when parent is dead. This is what you want most of the time. If you want to allow child process to daemonize explicitly call the
allow_daemonizemethod (but look at documentation of
We don't search for
PATH. It's hard to do right in all cases of
pivot_root, user and mount namespaces. So we expect its easier to do for your specific container setup.
Anyway this is low-level interface. You may want to use some higher level abstraction which mounts filesystems, sets network and monitors processes.
The reference to the running child
Main class for running processes. Works in the spirit of builder pattern.
Entry (row) in the gid map
A reading end of
A writing end of
A temporary value returned from
This is a builder for various settings of how command may be printed
Entry (row) in the uid map
The event returned from
Error runnning process
The exit status of a process
An enumeration that is used to configure non-stdio file descriptors. It differs from stdio one because we must differentiate from readable and writable file descriptors for things open by the library
Namespace name to unshare
An enumeration that is used to configure stdio file descritors
Creates iterator over child events
Creates iterator over zombie processes