projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c96381b
)
Check that putenv succeeded, suggested by Jonas Holmberg.
author
Matt Kraai
<kraai@debian.org>
Fri, 11 May 2001 15:16:28 +0000
(15:16 -0000)
committer
Matt Kraai
<kraai@debian.org>
Fri, 11 May 2001 15:16:28 +0000
(15:16 -0000)
coreutils/env.c
patch
|
blob
|
history
env.c
patch
|
blob
|
history
diff --git
a/coreutils/env.c
b/coreutils/env.c
index aca7c3ae2f4f0ddb28153fcf8c9714da8bd5c9d0..626fc1952a6d976aad3b590086ed60942af294e4 100644
(file)
--- a/
coreutils/env.c
+++ b/
coreutils/env.c
@@
-59,7
+59,8
@@
extern int env_main(int argc, char** argv)
cleanenv[0] = NULL;
}
for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv)
- putenv(*argv);
+ if (putenv(*argv) < 0)
+ perror_msg_and_die("%s", *argv);
if (*argv) {
execvp(*argv, argv);
perror_msg_and_die("%s", *argv);
diff --git
a/env.c
b/env.c
index aca7c3ae2f4f0ddb28153fcf8c9714da8bd5c9d0..626fc1952a6d976aad3b590086ed60942af294e4 100644
(file)
--- a/
env.c
+++ b/
env.c
@@
-59,7
+59,8
@@
extern int env_main(int argc, char** argv)
cleanenv[0] = NULL;
}
for (argv += optind; *argv && (p = strchr(*argv, '=')); ++argv)
- putenv(*argv);
+ if (putenv(*argv) < 0)
+ perror_msg_and_die("%s", *argv);
if (*argv) {
execvp(*argv, argv);
perror_msg_and_die("%s", *argv);