diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-30 23:50:48 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-09-30 23:50:48 +0000 |
commit | 96e1b38586e80a0f014038bf4fdf4689c668fbd6 (patch) | |
tree | d7f6a7866700601598cfcc006b7dcb6cb4a7c07e /shell/ash.c | |
parent | deabacdf91c6d1c3cfcdb4cd06780807193de81d (diff) | |
download | busybox-w32-96e1b38586e80a0f014038bf4fdf4689c668fbd6.tar.gz busybox-w32-96e1b38586e80a0f014038bf4fdf4689c668fbd6.tar.bz2 busybox-w32-96e1b38586e80a0f014038bf4fdf4689c668fbd6.zip |
introduce and use close_on_exec_on(fd). -50 bytes.
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index 183911ccc..9d8b83c18 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -3469,7 +3469,7 @@ setjobctl(int on) | |||
3469 | close(ofd); | 3469 | close(ofd); |
3470 | if (fd < 0) | 3470 | if (fd < 0) |
3471 | goto out; | 3471 | goto out; |
3472 | fcntl(fd, F_SETFD, FD_CLOEXEC); | 3472 | close_on_exec_on(fd); |
3473 | do { /* while we are in the background */ | 3473 | do { /* while we are in the background */ |
3474 | pgrp = tcgetpgrp(fd); | 3474 | pgrp = tcgetpgrp(fd); |
3475 | if (pgrp < 0) { | 3475 | if (pgrp < 0) { |
@@ -8830,7 +8830,7 @@ closescript(void) | |||
8830 | static void | 8830 | static void |
8831 | setinputfd(int fd, int push) | 8831 | setinputfd(int fd, int push) |
8832 | { | 8832 | { |
8833 | fcntl(fd, F_SETFD, FD_CLOEXEC); | 8833 | close_on_exec_on(fd); |
8834 | if (push) { | 8834 | if (push) { |
8835 | pushfile(); | 8835 | pushfile(); |
8836 | parsefile->buf = 0; | 8836 | parsefile->buf = 0; |