summaryrefslogtreecommitdiffstats
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-03-22 18:30:58 +0000
committerChristopher Faylor <me@cgf.cx>2003-03-22 18:30:58 +0000
commitff3ef36d88dc4b3e632e30df7e077a573b77b3f7 (patch)
treeb4cc26b164ebef67f5863d6bfd649555076168a4 /winsup
parentca04f61fc7b7d38bb21db969ec8b70007bde868f (diff)
downloadcygnal-ff3ef36d88dc4b3e632e30df7e077a573b77b3f7.tar.gz
cygnal-ff3ef36d88dc4b3e632e30df7e077a573b77b3f7.tar.bz2
cygnal-ff3ef36d88dc4b3e632e30df7e077a573b77b3f7.zip
* pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't exist.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pipe.cc9
2 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 666dc3a78..c74f46fa6 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2003-03-22 Christopher Faylor <cgf@redhat.com>
+ * pipe.cc (fhandler_pipe::dup): Don't dup input_handle if it doesn't
+ exist.
+
+2003-03-22 Christopher Faylor <cgf@redhat.com>
+
* syscalls.cc (unlink): Be more defensive when SetFileAttributes is
called. Fix typo in debugging output.
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc
index f131fd43f..a84aeee60 100644
--- a/winsup/cygwin/pipe.cc
+++ b/winsup/cygwin/pipe.cc
@@ -133,9 +133,12 @@ fhandler_pipe::fixup_after_fork (HANDLE parent)
int
fhandler_pipe::dup (fhandler_base *child)
{
- int res = fhandler_base::dup (child);
- if (res)
- return res;
+ if (get_handle ())
+ {
+ int res = fhandler_base::dup (child);
+ if (res)
+ return res;
+ }
fhandler_pipe *ftp = (fhandler_pipe *) child;