blob: a52199f461506552947898ff4459a6580718084a (
plain) (
tree)
|
|
.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 < m@maandree.se >
|