summaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-03 01:44:05 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-03 01:44:05 +0000
commitfcddc3fde34b6d9f5774e548a3c4262bf7da2e06 (patch)
tree44791499835cb170eba18ffeb5c0b74be05d55e1 /io.c
parent06768bbbe4aa16c18f132f1a7957886d540e6c64 (diff)
downloadruby-fcddc3fde34b6d9f5774e548a3c4262bf7da2e06.tar.gz
ruby-fcddc3fde34b6d9f5774e548a3c4262bf7da2e06.tar.xz
ruby-fcddc3fde34b6d9f5774e548a3c4262bf7da2e06.zip
* io.c (popen_exec): close file descriptors other than standard I/Os.
fixed: [ruby-dev:28924] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/io.c b/io.c
index 3d0e1632c..450c39e33 100644
--- a/io.c
+++ b/io.c
@@ -2950,11 +2950,7 @@ popen_exec(void *pp)
popen_redirect(p);
for (fd = 3; fd < NOFILE; fd++) {
-#ifdef FD_CLOEXEC
- fcntl(fd, F_SETFL, FD_CLOEXEC);
-#else
close(fd);
-#endif
}
return rb_exec(&p->exec);
}