From: Eric Andersen Date: Tue, 6 Mar 2001 20:28:22 +0000 (-0000) Subject: Close open files before calling builtin_exec(). I've tested this X-Git-Tag: 0_50~114 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=07f2f3917a08eea89953c8f0c3f1bc6ef52879b4;p=oweals%2Fbusybox.git Close open files before calling builtin_exec(). I've tested this and it fixes bug #1121. -Erik --- diff --git a/lash.c b/lash.c index 077cb1182..57d969e40 100644 --- a/lash.c +++ b/lash.c @@ -300,6 +300,7 @@ static int builtin_exec(struct child_prog *child) if (child->argv[1] == NULL) return EXIT_SUCCESS; /* Really? */ child->argv++; + close_all(); pseudo_exec(child); /* never returns */ } diff --git a/sh.c b/sh.c index 077cb1182..57d969e40 100644 --- a/sh.c +++ b/sh.c @@ -300,6 +300,7 @@ static int builtin_exec(struct child_prog *child) if (child->argv[1] == NULL) return EXIT_SUCCESS; /* Really? */ child->argv++; + close_all(); pseudo_exec(child); /* never returns */ } diff --git a/shell/lash.c b/shell/lash.c index 077cb1182..57d969e40 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -300,6 +300,7 @@ static int builtin_exec(struct child_prog *child) if (child->argv[1] == NULL) return EXIT_SUCCESS; /* Really? */ child->argv++; + close_all(); pseudo_exec(child); /* never returns */ }