diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -3029,14 +3029,8 @@ pipe_open(int argc, VALUE *argv, const char *mode) /* parent */ if (pid == -1) { int e = errno; - if ((modef & FMODE_READABLE)) { - close(arg.pair[0]); - close(arg.pair[1]); - } - if ((modef & FMODE_WRITABLE)) { - close(arg.pair[0]); - close(arg.pair[1]); - } + close(arg.pair[0]); + close(arg.pair[1]); errno = e; rb_sys_fail(cmd); } |