aboutsummaryrefslogtreecommitdiffstats
path: root/exec-as.1
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-17 17:29:06 +0200
committerMattias Andrée <maandree@kth.se>2017-10-17 17:29:06 +0200
commitd04679a2e30ecc35a68e876829984c9dfba710e4 (patch)
tree209cb4a0962153e7ca948d82e7efaa9b3db750ae /exec-as.1
parentupdate dist (diff)
downloadexec-as-d04679a2e30ecc35a68e876829984c9dfba710e4.tar.gz
exec-as-d04679a2e30ecc35a68e876829984c9dfba710e4.tar.bz2
exec-as-d04679a2e30ecc35a68e876829984c9dfba710e4.tar.xz
Rewrite and relicense1.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'exec-as.1')
-rw-r--r--exec-as.150
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 >