svn commit: trunk/busybox/shell
landley at busybox.net
landley at busybox.net
Sat Jul 1 17:19:04 UTC 2006
Author: landley
Date: 2006-07-01 10:19:02 -0700 (Sat, 01 Jul 2006)
New Revision: 15575
Log:
Patch from Shaun Jackman moving the var=value logic to here it can do some good.
Modified:
trunk/busybox/shell/lash.c
Changeset:
Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c 2006-07-01 15:48:34 UTC (rev 15574)
+++ trunk/busybox/shell/lash.c 2006-07-01 17:19:02 UTC (rev 15575)
@@ -1171,12 +1171,6 @@
{
struct built_in_command *x;
- /* Check if the command sets an environment variable. */
- if( strchr(child->argv[0], '=') != NULL ) {
- child->argv[1] = child->argv[0];
- _exit(builtin_export(child));
- }
-
/* Check if the command matches any of the non-forking builtins.
* Depending on context, this might be redundant. But it's
* easier to waste a few CPU cycles than it is to figure out
@@ -1300,6 +1294,12 @@
* is doomed to failure, and doesn't work on bash, either.
*/
if (newjob->num_progs == 1) {
+ /* Check if the command sets an environment variable. */
+ if (strchr(child->argv[0], '=') != NULL) {
+ child->argv[1] = child->argv[0];
+ return builtin_export(child);
+ }
+
for (x = bltins; x->cmd; x++) {
if (strcmp(child->argv[0], x->cmd) == 0 ) {
int rcode;
More information about the busybox-cvs
mailing list