diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-12-02 04:57:15 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-12-02 04:57:15 +0100 |
commit | ccd85577c45519fd00a3ccc5bd40a111a9b3e12a (patch) | |
tree | aadc07a3a5f8d5a29025fa214b90c2af52dee9a5 | |
parent | improve gitignore (diff) | |
download | exec-as-ccd85577c45519fd00a3ccc5bd40a111a9b3e12a.tar.gz exec-as-ccd85577c45519fd00a3ccc5bd40a111a9b3e12a.tar.bz2 exec-as-ccd85577c45519fd00a3ccc5bd40a111a9b3e12a.tar.xz |
improve readme
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | README | 31 |
1 files changed, 24 insertions, 7 deletions
@@ -1,12 +1,29 @@ -A command that lets you start another command with any argv[0]. +NAME + exec-as - exec(1) with explicit argv[0] +SYNOPSIS + exec-as FILE ARGV0 [ARGV]... -`exec-as bash -bash` will run the first program in $PATH -named bash, and set argv[0] to -bash (making it a login -shell.) You can add addition argument as needed. +DESCRIPTION + exec-as shall spawn the program FILE, using execvp(3), + using ARGV0 as the value for argv[0], and the following + arguments for the following values in argv. +NOTES + At least two arguments is required. Since this is not + a builtin function, it cannot be used as exec(1) without + arguments to set file descriptors. -Note that to actually exec rather than then fork–exec:ing -you need to type `exec exec-as` instead of `exec-as`, as -the shell would otherwise fork first. + Because this is not a builtin function, running this + program would normally do an fork–exec rather than + just an exec. To just perform an exec, you need to + use exec(1) too: exec exec-as + +EXAMPLES + 'exec-as bash -bash' will run the first program in + $PATH named bash, and set argv[0] to -bash (making it + a login shell.) You can add addition argument as needed. + +SEE ALSO + exec(1), exec(3) |