* io.c (rb_pipe): pipe on cygwin can succeed half but fail
half. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b1b58cfd9b
commit
f46cff647e
@ -1,3 +1,8 @@
|
|||||||
|
Sun Jul 31 18:58:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (rb_pipe): pipe on cygwin can succeed half but fail
|
||||||
|
half.
|
||||||
|
|
||||||
Sun Jul 31 11:31:07 2011 Kazuki Tsujimoto <kazuki@callcc.net>
|
Sun Jul 31 11:31:07 2011 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||||
|
|
||||||
* vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]
|
* vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]
|
||||||
|
8
io.c
8
io.c
@ -4914,6 +4914,14 @@ rb_pipe(int *pipes)
|
|||||||
ret = pipe(pipes);
|
ret = pipe(pipes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef __CYGWIN__
|
||||||
|
if (ret == 0 && pipes[1] == -1) {
|
||||||
|
close(pipes[0]);
|
||||||
|
pipes[0] = -1;
|
||||||
|
errno = ENFILE;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
rb_update_max_fd(pipes[0]);
|
rb_update_max_fd(pipes[0]);
|
||||||
rb_update_max_fd(pipes[1]);
|
rb_update_max_fd(pipes[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user