summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-10-26 13:32:49 -0600
committerEric Blake <ebb9@byu.net>2009-10-26 21:30:34 -0600
commitf00bbe33e41a9849351ea57c2706516d43e1e98d (patch)
tree1b8e228f7451a6624970850f97c5473f45957e79 /src
parent0f3f6bf6bf38f1ed9c85fe98d6ac7645bf10a6c3 (diff)
downloadcoreutils-f00bbe33e41a9849351ea57c2706516d43e1e98d.tar.xz
tests: clean up tests of env -- handling
The comment in env.c about -- handling has not matched the behavior in the code since the initial commit back in 1992. * src/env.c: Fix bogus comment. * tests/misc/env: Further tweaks, avoiding PATH problems inherent in testing -i, and testing program name containing =. * doc/coreutils.texi (env invocation): Mention that intermediate program is needed to invoke program with name containing =.
Diffstat (limited to 'src')
-rw-r--r--src/env.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/env.c b/src/env.c
index 02d155d42..8d7d55e47 100644
--- a/src/env.c
+++ b/src/env.c
@@ -35,14 +35,14 @@
zero-length value is different from unsetting it.
--
- Indicate that the following argument is the program
- to invoke. This is necessary when the program's name
- begins with "-" or contains a "=".
+ Indicate that the following argument is not an option.
+ This is necessary when the program's name begins with "-",
+ but does not help if the program's name contains a "=".
The first remaining argument specifies a program to invoke;
it is searched for according to the specification of the PATH
- environment variable. Any arguments following that are
- passed as arguments to that program.
+ environment variable, after environment modifications. Any
+ arguments following that are passed as arguments to that program.
If no command name is specified following the environment
specifications, the resulting environment is printed.
@@ -72,8 +72,9 @@
call.
env -u EDITOR LOGNAME=foo PATH=/energy -- e=mc2 bar baz
- runs the program "/energy/e=mc2" with environment
- { LOGNAME=foo PATH=/energy }
+ attempts to run the program "/energy/--" with arguments
+ "e=mc2", "bar" and "baz" in the environment
+ { LOGNAME=foo PATH=/energy }.
*/
#include <config.h>