Close open files before calling builtin_exec(). I've tested this
and it fixes bug #1121. -Erik
This commit is contained in:
parent
1a046d5f9d
commit
07f2f3917a
1
lash.c
1
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 */
|
||||
}
|
||||
|
1
sh.c
1
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 */
|
||||
}
|
||||
|
@ -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 */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user