summaryrefslogtreecommitdiffstats
path: root/usr.bin/env
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2005-06-21 19:38:26 +0000
committergad <gad@FreeBSD.org>2005-06-21 19:38:26 +0000
commit45fff07d96acc4d602e1c01c92204d88a028b666 (patch)
treea3f404b8c239eeb42e3c225b57fce4d6029b7a39 /usr.bin/env
parent61ec41cf0fc0eb44037e8813afae99dc3909db16 (diff)
downloadFreeBSD-src-45fff07d96acc4d602e1c01c92204d88a028b666.zip
FreeBSD-src-45fff07d96acc4d602e1c01c92204d88a028b666.tar.gz
Undo r1.14 to env.c. While it is unusual for environment variables to
start with a '/', they are more supported (by POSIX and SUSv3) than filenames which have an '=' in them. Noticed by: tjr Approved by: re (blanket `env')
Diffstat (limited to 'usr.bin/env')
-rw-r--r--usr.bin/env/env.16
-rw-r--r--usr.bin/env/env.c3
2 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/env/env.1 b/usr.bin/env/env.1
index 9316175..8a1467a 100644
--- a/usr.bin/env/env.1
+++ b/usr.bin/env/env.1
@@ -445,11 +445,7 @@ utility does not handle values of
.Ar utility
which have an equals sign
.Pq Ql =
-in their name (for obvious reasons), unless the
-.Ar utility
-name begins with a
-.Ql /
-character.
+in their name, for obvious reasons.
.Pp
The
.Nm
diff --git a/usr.bin/env/env.c b/usr.bin/env/env.c
index 56c671b..815976f 100644
--- a/usr.bin/env/env.c
+++ b/usr.bin/env/env.c
@@ -102,8 +102,7 @@ main(int argc, char **argv)
if (env_verbosity)
fprintf(stderr, "#env clearing environ\n");
}
- for (argv += optind; *argv && (**argv != '/') && (p = strchr(*argv,
- '=')); ++argv) {
+ for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv) {
if (env_verbosity)
fprintf(stderr, "#env setenv:\t%s\n", *argv);
(void)setenv(*argv, ++p, 1);
OpenPOWER on IntegriCloud