diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-13 12:45:43 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-13 12:45:43 +0000 |
| commit | 0c77840313e4f86c645b9cac362f83b3c1028105 (patch) | |
| tree | 325598c0f00881a9c5b4ea38186d6e93c39ee3dd | |
| parent | f5cf22b54f3ab0b7033843d99834aa6dadb7fe51 (diff) | |
| download | ruby-0c77840313e4f86c645b9cac362f83b3c1028105.tar.gz ruby-0c77840313e4f86c645b9cac362f83b3c1028105.tar.xz ruby-0c77840313e4f86c645b9cac362f83b3c1028105.zip | |
* io.c (io_reopen, rb_io_init_copy): should register fptr to pipe_list
when copying pipe fptr.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 8 |
2 files changed, 13 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Tue Jan 13 21:44:30 2009 NAKAMURA Usaku <usa@ruby-lang.org> + + * io.c (io_reopen, rb_io_init_copy): should register fptr to pipe_list + when copying pipe fptr. + Tue Jan 13 21:38:07 2009 Tanaka Akira <akr@fsij.org> * ext/socket/socket.c (rb_getaddrinfo): use getaddrinfo with GVL if @@ -5259,6 +5259,10 @@ io_reopen(VALUE io, VALUE nfile) if (orig->pathv) fptr->pathv = orig->pathv; else fptr->pathv = Qnil; fptr->finalize = orig->finalize; +#if defined (__CYGWIN__) || !defined(HAVE_FORK) + if (fptr->finalize == pipe_finalize) + pipe_add_fptr(fptr); +#endif fd = fptr->fd; fd2 = orig->fd; @@ -5410,6 +5414,10 @@ rb_io_init_copy(VALUE dest, VALUE io) fptr->lineno = orig->lineno; if (!NIL_P(orig->pathv)) fptr->pathv = orig->pathv; fptr->finalize = orig->finalize; +#if defined (__CYGWIN__) || !defined(HAVE_FORK) + if (fptr->finalize == pipe_finalize) + pipe_add_fptr(fptr); +#endif fd = ruby_dup(orig->fd); fptr->fd = fd; |
