diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-08-14 11:16:09 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-08-14 11:16:09 +0000 |
commit | f5a51f9187b59bcb5ef4bddb5bf291cce24d74c9 (patch) | |
tree | a8271dc74a61739e996c9003b058081e53296f2c /winsup/cygwin/pipe.cc | |
parent | 5578c337332104e77c1d124dce843b460d00d480 (diff) | |
download | cygnal-f5a51f9187b59bcb5ef4bddb5bf291cce24d74c9.tar.gz cygnal-f5a51f9187b59bcb5ef4bddb5bf291cce24d74c9.tar.bz2 cygnal-f5a51f9187b59bcb5ef4bddb5bf291cce24d74c9.zip |
* pipe.cc (fhandler_pipe::open): Duplicate content of opened pipe
fhandler before calling dup method.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 29bd73205..2f3bebe2c 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -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; |