opt!("inherit";*3"Inherit the i/o from parent (this) process"),
opt!("close";*4"Close the I/O"),
opt!("inherit";*3"Inherit the stream from parent (this) process"),
opt!("close";*4"Close the stream"),
opt!("ignore";*3"Don't close the stream, but don't do anything with it"),
opt!("file"=>"filename";*2"Use this file as input / output.\n\t\t\t\tFor input, if the file is not readable or nonexistant, it causes a panic.\n\t\t\t\tFor output, it appends to the file or uses a new one for output.\n\t\t\t\tIf this is not possible, it causes a panic.\n\t\t\t\tTo overwrite the files instead of appending, use file:clobber"),
opt!("file:clobber"=>"filename";"Only valid for outputs, overwrite the file and write to it, instead of appending"),
opt!("stderr";*3"Redirect stdout to the same location as stderr.\n\t\t\t\tIf there is a cycle detected here, or it is used for anything other that stdout, there is a panic"),
opt!("stdout";*3"Redirect stderr to the same location as stdout.\n\t\t\t\tIf there is a cycle detected here, or it is used for anything other that stdout, there is a panic"),
opt!("Control"),
opt!(where"Controlling how processes are spawned\nThese can be overridden individually with explicit inputs"),
opt!("--uid"=>"uid";"Run as user specified by `uid`. Panics if `uid` is not a valid user id\n\t\t(note: Process must be ran as root to use this option)"),
opt!("--user"=>"user";"Same as `--uid`, except specified user is by name instead of uid"),
opt!("--gid"=>"gid";"Same as `--uid`, except runs as specific group instead of user"),
opt!("--group"=>"group";"Same as `--gid`, except specified group is by name instead of gid"),
opt!()
]
}
@ -187,7 +202,15 @@ impl fmt::Display for Opt
{
iter![
opt!(in"COMPLETION"),
opt!(where"Directives for how to handle process completion"),
opt!(where"Directives for how to handle abnormal process completion (i.e. non-zero exit codes)\nThis does not apply to `detached` processes",["DETACHING"]),
opt!("ignore";*2"Ignore process return code"),
opt!("supercede";*2"If return code is a non-zero code, use it as the return code for the parent (this) process.\n\t\t\tIf there are multiple non-zero return codes, it is not specified which is returned"),
opt!("terminate";*2"If return code is a non-zero code, abort all running children and return the code as this process' return code immediately"),
opt!("wait";*3"Same as `terminate`, except waits for currently active processes to complete before aborting"),
opt!("log";*3"Write the code to this process' `stderr` if non-zero"),
opt!("file"=>"filename";"If non-zero, write the code to a file if non-zero. If unable to write to the file, it is ignored"),
opt!("retry"=>"number";"If non-zero, restart the process up to `number` times.\n\t\t\tIf `number` if 'inf', retry indefinately (this can cause an infinite loop if program never completes with zero exit code)"),