mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (save_redirect_fd): consider EBADF that the fd is not used.
[ruby-dev:39938] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0ad3bee01f
commit
96abe7f35e
2 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Dec 31 14:20:11 2009 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* process.c (save_redirect_fd): consider EBADF that the fd is not used.
|
||||
[ruby-dev:39938]
|
||||
|
||||
Thu Dec 31 06:03:48 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/socket/raddrinfo.c (addrinfo_type): typed.
|
||||
|
|
|
@ -1863,6 +1863,8 @@ save_redirect_fd(int fd, VALUE save, char *errmsg, size_t errmsg_buflen)
|
|||
VALUE newary;
|
||||
int save_fd = redirect_dup(fd);
|
||||
if (save_fd == -1) {
|
||||
if (errno == EBADF)
|
||||
return 0;
|
||||
ERRMSG("dup");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue