diff --git a/ChangeLog b/ChangeLog index 1190b3f89b..53c2e16862 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Dec 31 14:20:11 2009 NAKAMURA Usaku + + * 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 * ext/socket/raddrinfo.c (addrinfo_type): typed. diff --git a/process.c b/process.c index 081e927bab..07ad06e178 100644 --- a/process.c +++ b/process.c @@ -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; }