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 /runit/runsvdir.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 'runit/runsvdir.c')
-rw-r--r-- | runit/runsvdir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index 8d25923d4..924f771b7 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -190,8 +190,8 @@ static int setup_log(void) | |||
190 | warnx("cannot create pipe for log"); | 190 | warnx("cannot create pipe for log"); |
191 | return -1; | 191 | return -1; |
192 | } | 192 | } |
193 | coe(logpipe[1]); | 193 | close_on_exec_on(logpipe[1]); |
194 | coe(logpipe[0]); | 194 | close_on_exec_on(logpipe[0]); |
195 | ndelay_on(logpipe[0]); | 195 | ndelay_on(logpipe[0]); |
196 | ndelay_on(logpipe[1]); | 196 | ndelay_on(logpipe[1]); |
197 | if (dup2(logpipe[1], 2) == -1) { | 197 | if (dup2(logpipe[1], 2) == -1) { |
@@ -245,7 +245,7 @@ int runsvdir_main(int argc, char **argv) | |||
245 | curdir = open_read("."); | 245 | curdir = open_read("."); |
246 | if (curdir == -1) | 246 | if (curdir == -1) |
247 | fatal2_cannot("open current directory", ""); | 247 | fatal2_cannot("open current directory", ""); |
248 | coe(curdir); | 248 | close_on_exec_on(curdir); |
249 | 249 | ||
250 | stampcheck = monotonic_sec(); | 250 | stampcheck = monotonic_sec(); |
251 | 251 | ||