aboutsummaryrefslogtreecommitdiffstats
path: root/README
blob: 1bb3ece7650b6412aa0ecf3818bff73e159357b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
NAME
	exec-as - exec(1) with explicit argv[0]

SYNOPSIS
	exec-as command [argv0 [arg ...]]

DESCRIPTION
	exec-as runs the program command, using execvp(3),
	using argv0 as the value for argv[0], and the following
	arguments for the following values in argv.

NOTES
	At least one argument is required. Since this is not
	a built-in function, it cannot be used as exec(1) without
	arguments to set file descriptors.

	Because this is not a built-in function, running this
	program would normally do a 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 additional arguments as needed.

SEE ALSO
	exec(1), exec(3)