aboutsummaryrefslogtreecommitdiff
path: root/posix/wordexp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-07-02 11:50:55 +0000
committerUlrich Drepper <drepper@redhat.com>1999-07-02 11:50:55 +0000
commit4708015f24a69bd0a436483c4d1244d1fb1f2e87 (patch)
treee3d55cddb335ee69a1f872b3461d567c5cf1c9ec /posix/wordexp.c
parent8d93eb92afa7e829225a0e884cc492e138feb515 (diff)
downloadglibc-4708015f24a69bd0a436483c4d1244d1fb1f2e87.tar
glibc-4708015f24a69bd0a436483c4d1244d1fb1f2e87.tar.gz
glibc-4708015f24a69bd0a436483c4d1244d1fb1f2e87.tar.bz2
glibc-4708015f24a69bd0a436483c4d1244d1fb1f2e87.zip
Update.
1999-07-02 Tim Waugh <tim@cyberelk.demon.co.uk> * posix/wordexp-test.c: Revert bogus 'unset IFS' change. It doesn't belong in the tests, but in the wordexp implementation. * posix/wordexp.c (exec_comm): Unset IFS so that subshells don't split fields.
Diffstat (limited to 'posix/wordexp.c')
-rw-r--r--posix/wordexp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/posix/wordexp.c b/posix/wordexp.c
index b6cf85af32..dde9183db5 100644
--- a/posix/wordexp.c
+++ b/posix/wordexp.c
@@ -859,6 +859,9 @@ exec_comm (char *comm, char **word, size_t *word_length, size_t *max_length,
}
}
+ /* Make sure the subshell doesn't field-split on our behalf. */
+ unsetenv ("IFS");
+
__close (fildes[0]);
__execve (_PATH_BSHELL, (char *const *) args, __environ);