diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-05-06 19:28:56 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-05-12 18:01:01 +1000 |
commit | 5abe895bd25a9e07b7d98617d145dbf048e44a21 (patch) | |
tree | 58f1655ac902437d624976a3a7c0023402e739da /src/redir.c | |
parent | [REDIR] Replace copyfd by savefd and use dup2 elsewhere (diff) | |
download | dash-5abe895bd25a9e07b7d98617d145dbf048e44a21.tar.gz dash-5abe895bd25a9e07b7d98617d145dbf048e44a21.zip |
[REDIR] Remove redundant CLOEXEC calls
Now that we're marking file descriptors as CLOEXEC in savefd, we no longer need to close them on exec or in setinputfd.
Diffstat (limited to 'src/redir.c')
-rw-r--r-- | src/redir.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/redir.c b/src/redir.c index 9e0fae5..6ffde0c 100644 --- a/src/redir.c +++ b/src/redir.c @@ -345,26 +345,19 @@ popredir(int drop) INCLUDE "redir.h" RESET { - clearredir(0); -} - -#endif - -/* - * Discard all saved file descriptors. - */ - -void -clearredir(int drop) -{ + /* + * Discard all saved file descriptors. + */ for (;;) { nullredirs = 0; if (!redirlist) break; - popredir(drop); + popredir(0); } } +#endif + /* |