* pipe.cc (fhandler_pipe::open): Duplicate content of opened pipe

fhandler before calling dup method.
This commit is contained in:
Corinna Vinschen 2010-08-14 11:16:09 +00:00
parent 5578c33733
commit f5a51f9187
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2010-08-14 Corinna Vinschen <corinna@vinschen.de>
* pipe.cc (fhandler_pipe::open): Duplicate content of opened pipe
fhandler before calling dup method.
2010-08-13 Corinna Vinschen <corinna@vinschen.de>
* cygheap.h (class cwdstuff): Make drive_length private.

View File

@ -86,6 +86,9 @@ fhandler_pipe::open (int flags, mode_t mode)
set_errno (EACCES);
return 0;
}
*this = *(fhandler_pipe *) cfd;
set_io_handle (NULL);
pc.reset_conv_handle ();
if (!cfd->dup (this))
return 1;
return 0;