diff options
Diffstat (limited to 'exec-as.1')
-rw-r--r-- | exec-as.1 | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/exec-as.1 b/exec-as.1 new file mode 100644 index 0000000..cf5c14f --- /dev/null +++ b/exec-as.1 @@ -0,0 +1,50 @@ +.TH EXEC-AS 1 EXEC-AS +.SH NAME +exec-as - exec(1) with explicit argv[0] +.SH SYNOPSIS +.B exec-as +.I command +.RI [ argv0 +.RI [ arg \ ...]] +.SH DESCRIPTION +.B exec-as +runs the program +.IR command , +using +.BR execvp (3), +using +.I argv0 +as the value for +.BR argv[0] , +and the following arguments for the following values in +.BR argv . +.SH NOTES +At least one argument is required. Since this is not +a builtin function, it cannot be used as +.BR exec (1) +without arguments to set file descriptors. +.PP +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 +.BR exec (1) +too: +.B exec exec-as +.SH EXAMPLES +.B exec-as bash -bash +will run the first program in +.B $PATH +named +.BR bash , +and set +.B argv[0] +to +.B \-bash +(making it a login shell.) You can add addition argument as needed. +.SH "SEE ALSO" +.BR exec (1), +.BR exec (3) +.SH AUTHORS +Mattias Andrée +.RI < maandree@kth.se > |