From f19da5f77d0a7212f0767d1e2a07c54ccdb8acd8 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 27 Mar 2004 18:01:04 +0000 Subject: [PATCH] * fhandler_nodevice.cc (fhandler_nodevice::open): Assume that errno has already been set if pc.error is nonzero. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_nodevice.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; } -- 2.43.5