diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a7e348654..5da98a5fd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2004-03-27 Christopher Faylor + + * fhandler_nodevice.cc (fhandler_nodevice::open): Assume that errno has + already been set if pc.error is nonzero. + 2004-03-26 Christopher Faylor * cygheap.cc (cygheap_fixup_in_child): Improve strace output. diff --git a/winsup/cygwin/fhandler_nodevice.cc b/winsup/cygwin/fhandler_nodevice.cc index d27747bb5..c23e4434b 100644 --- a/winsup/cygwin/fhandler_nodevice.cc +++ b/winsup/cygwin/fhandler_nodevice.cc @@ -31,7 +31,8 @@ details. */ int fhandler_nodevice::open (int, mode_t) { - set_errno (ENXIO); + if (!pc.error) + set_errno (ENXIO); return 0; }