mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (popen_exec): should not close close-on-exec FDs.
[ruby-dev:30679] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ce7494cda
commit
9c64c3ed5c
2 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Apr 4 10:01:20 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (popen_exec): should not close close-on-exec FDs.
|
||||||
|
[ruby-dev:30679]
|
||||||
|
|
||||||
Tue Apr 4 04:17:18 2007 Technorama Ltd. <oss-ruby@technorama.net>
|
Tue Apr 4 04:17:18 2007 Technorama Ltd. <oss-ruby@technorama.net>
|
||||||
|
|
||||||
* ext/openssl/ossl_ssl.c: Add documentation.
|
* ext/openssl/ossl_ssl.c: Add documentation.
|
||||||
|
|
3
io.c
3
io.c
|
@ -3040,6 +3040,9 @@ popen_exec(void *pp)
|
||||||
|
|
||||||
popen_redirect(p);
|
popen_redirect(p);
|
||||||
for (fd = 3; fd < NOFILE; fd++) {
|
for (fd = 3; fd < NOFILE; fd++) {
|
||||||
|
#ifdef FD_CLOEXEC
|
||||||
|
if (fcntl(fd, F_GETFD) & FD_CLOEXEC) continue;
|
||||||
|
#endif
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
return rb_exec(&p->exec);
|
return rb_exec(&p->exec);
|
||||||
|
|
Loading…
Add table
Reference in a new issue