var searchIndex = {}; searchIndex["unshare"] = {"doc":"The `Command` has mostly same API as `std::process::Command` except where\nis absolutely needed.","items":[[3,"PipeReader","unshare","",null,null],[3,"PipeWriter","","",null,null],[3,"UidMap","","",null,null],[12,"inside_uid","","",0,null],[12,"outside_uid","","",0,null],[12,"count","","",0,null],[3,"GidMap","","",null,null],[12,"inside_gid","","",1,null],[12,"outside_gid","","",1,null],[12,"count","","",1,null],[3,"Command","","Main class for running processes. Works in the spirit of builder pattern.",null,null],[3,"Child","","The reference to the running child",null,null],[12,"stdin","","",2,null],[12,"stdout","","",2,null],[12,"stderr","","",2,null],[4,"Error","","",null,null],[13,"InvalidPath","","Invalid path somewhere when running command. Presumably has embedded\nnulls.",3,null],[13,"UnknownError","","Some invalid error code received from child application",3,null],[13,"CreatePipe","","Error happened when we were trying to create pipe. The pipes used for\ntwo purposes: (a) for the process's stdio (`Stdio::pipe()` or\n`Stdio::null()`), (b) internally to wake up child process and return\nerror back to the parent.",3,null],[13,"Fork","","Error when forking/cloning process",3,null],[13,"Exec","","Error when running execve() systemcall",3,null],[13,"Chdir","","Error when setting working directory specified by user",3,null],[13,"ParentDeathSignal","","Unable to set death signal (probably signal number invalid)",3,null],[13,"PipeError","","Error reading/writing through one of the two signal pipes",3,null],[13,"WaitError","","Error waiting for process (for some functions only, for example\n``Command::status()``). It probably means someone already waited for\nthe process, for example it might be other thread, or signal handler.",3,null],[13,"StdioError","","Error setting up stdio for process",3,null],[13,"SetUser","","Could not set supplementary groups, group id or user id for the\nprocess",3,null],[13,"ChangeRoot","","Error changing root, it explains `chroot`, `pivot_root` system calls\nand setting working directory inside new root. Also includes unmounting\nold file system for pivot_root case.",3,null],[13,"SetIdMap","","Error setting uid or gid map. May be either problem running\n`newuidmap`/`newgidmap` command or writing the mapping file directly",3,null],[4,"ExitStatus","","",null,null],[13,"Exited","","Process exited normally with some exit code",4,null],[13,"Signaled","","Process was killed by a signal (bool flag is true when core is dumped)",4,null],[4,"Stdio","","An enumeration that is used to configure stdio file descritors",null,null],[13,"Pipe","","",5,null],[13,"Inherit","","",5,null],[13,"Null","","",5,null],[13,"Fd","","",5,null],[4,"Fd","","An enumeration that is used to configure non-stdio file descriptors. It\ndiffers from stdio one because we must differentiate from readable and\nwritable file descriptors for things open by the library",null,null],[13,"ReadPipe","","",6,null],[13,"WritePipe","","",6,null],[13,"Inherit","","",6,null],[13,"ReadNull","","",6,null],[13,"WriteNull","","",6,null],[13,"Fd","","",6,null],[4,"Namespace","","Namespace name to unshare",null,null],[13,"Mount","","Unshare the mount namespace. It basically means that you can now mount\nand unmount folders without touching parent mount points.",7,null],[13,"Uts","","Unshare the UTS namespace. This allows you to change hostname of the\nnew container.",7,null],[13,"Ipc","","Unshare the IPC namespace. This creates new namespace for System V IPC\nPOSIX message queues and similar.",7,null],[13,"User","","Unshare user namespace. This allows unprivileged user to be root\nuser in new namespace and/or change mappings between real (outer)\nuser namespace and the inner one.",7,null],[13,"Pid","","Unshare pid namespace. The child process becomes PID 1 (inside\ncontainer) with the following rough list of consequences:",7,null],[13,"Net","","Unshare network namespace",7,null],[5,"reap_zombies","","Creates iterator over zombie processes",null,{"inputs":[],"output":{"name":"zombieiterator"}}],[11,"clone","","",7,null],[11,"eq","","",7,null],[11,"to_clone_flag","","",7,null],[11,"fmt","","",0,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"clone","","",0,null],[11,"fmt","","",1,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"new","","Constructs a new `Command` for launching the program at\npath `program`, with the following default configuration:",8,{"inputs":[{"name":"s"}],"output":{"name":"command"}}],[11,"arg","","Add an argument to pass to the program.",8,null],[11,"args","","Add multiple arguments to pass to the program.",8,null],[11,"init_env_map","","",8,null],[11,"env","","Inserts or updates an environment variable mapping.",8,null],[11,"env_remove","","Removes an environment variable mapping.",8,null],[11,"env_clear","","Clears the entire environment map for the child process.",8,null],[11,"current_dir","","Sets the working directory for the child process.",8,null],[11,"stdin","","Configuration for the child process's stdin handle (file descriptor 0).",8,null],[11,"stdout","","Configuration for the child process's stdout handle (file descriptor 1).",8,null],[11,"stderr","","Configuration for the child process's stderr handle (file descriptor 2).",8,null],[11,"uid","","Set user id of the new process. Note that it works only for root\nprocess or if you also set up user namespace",8,null],[11,"gid","","Set primary group id of the new process. Note that it works only for\nroot process or if you also set up user namespace",8,null],[11,"groups","","Set supplementary group ids. Note that it works only for root process\nor if you also set up user namespace",8,null],[11,"clone","","",3,null],[11,"fmt","","",3,null],[11,"raw_os_error","","Similarly to `io::Error` returns bare error code",3,null],[11,"description","","",3,null],[11,"fmt","","",3,null],[11,"fmt","","",9,null],[11,"fmt","","",10,null],[11,"into_fd","","",9,null],[11,"into_fd","","",10,null],[11,"drop","","",9,null],[11,"drop","","",10,null],[11,"read","","",9,null],[11,"write","","",10,null],[11,"flush","","",10,null],[11,"allow_daemonize","","Allow child process to daemonize. By default we run equivalent of\n`set_parent_death_signal(SIGKILL)`. See the `set_parent_death_signal`\nfor better explanation.",8,null],[11,"set_parent_death_signal","","Set a signal that is sent to a process when it's parent is dead.\nThis is by default set to `SIGKILL`. And you should keep it that way\nunless you know what you are doing.",8,null],[11,"chroot_dir","","Set chroot dir. Only absolute path is supported",8,null],[11,"pivot_root","","Moves the root of the file system to the directory `put_old` and\nmakes `new_root` the new root file system. Also it's optionally\nunmount `new_root` mount point after moving root (but it must exist\nanyway).",8,null],[11,"unshare","","Unshare given namespaces",8,null],[11,"set_id_maps","","Sets user id and group id mappings for new process",8,null],[11,"set_id_map_commands","","Set path to command-line utilities for writing uid/gid maps",8,null],[11,"keep_sigmask","","Keep signal mask intact after executing child, keeps also ignored\nsignals",8,null],[11,"arg0","","Set the argument zero for the process",8,null],[11,"file_descriptor","","Configuration for any other file descriptor (panics for fds < 3) use\nstdin/stdout/stderr for them",8,null],[11,"status","","Run the command and return exit status",8,null],[11,"spawn","","Spawn the command and return a handle that can be waited for",8,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"success","","",4,null],[11,"code","","",4,null],[11,"signal","","",4,null],[11,"fmt","","",4,null],[11,"id","","Returns pid of the process (a mirror of std method)",2,null],[11,"pid","","Returns pid of process with correct pid_t type",2,null],[11,"wait","","Synchronously wait for child to complete and return exit status",2,null],[11,"signal","","Send arbitrary unix signal to the process",2,null],[11,"kill","","Kill process with SIGKILL signal",2,null],[11,"take_pipe_reader","","Returns pipe reader for a pipe declared with `file_descriptor()`",2,null],[11,"take_pipe_writer","","Returns pipe writer for a pipe declared with `file_descriptor()`",2,null],[11,"piped","","Pipe is created for child process",5,{"inputs":[],"output":{"name":"stdio"}}],[11,"inherit","","The child inherits file descriptor from the parent process",5,{"inputs":[],"output":{"name":"stdio"}}],[11,"null","","Stream is attached to `/dev/null`",5,{"inputs":[],"output":{"name":"stdio"}}],[11,"to_fd","","Converts stdio definition to file descriptor definition\n(mostly needed internally)",5,null],[11,"piped_read","","Create a pipe so that child can read from it",6,{"inputs":[],"output":{"name":"fd"}}],[11,"piped_write","","Create a pipe so that child can write to it",6,{"inputs":[],"output":{"name":"fd"}}],[11,"inherit","","Inherit the child descriptor from parent",6,{"inputs":[],"output":{"name":"fd"}}],[11,"read_null","","Create a readable pipe that always has end of file condition",6,{"inputs":[],"output":{"name":"fd"}}],[11,"write_null","","Create a writable pipe that ignores all the input",6,{"inputs":[],"output":{"name":"fd"}}],[11,"from_raw_fd","","",5,{"inputs":[{"name":"rawfd"}],"output":{"name":"stdio"}}],[11,"from_raw_fd","","",6,{"inputs":[{"name":"rawfd"}],"output":{"name":"fd"}}],[11,"fmt","","",8,null],[11,"fmt","","",2,null]],"paths":[[3,"UidMap"],[3,"GidMap"],[3,"Child"],[4,"Error"],[4,"ExitStatus"],[4,"Stdio"],[4,"Fd"],[4,"Namespace"],[3,"Command"],[3,"PipeReader"],[3,"PipeWriter"]]}; initSearch(searchIndex);