From 6b3c247d078c8f5787db0628b5e0f02fbffdeba9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 26 Jul 2002 19:58:00 +0000 Subject: [PATCH] * fhandler_registry.cc (fhandler_registry::close): Return any error result to the caller. * syscalls.cc (_close): Return result of fhandler::close to the caller. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/fhandler_registry.cc | 2 +- winsup/cygwin/syscalls.cc | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 989f9781b..486554cf6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2002-07-26 Conrad Scott + + * fhandler_registry.cc (fhandler_registry::close): Return any error + result to the caller. + * syscalls.cc (_close): Return result of fhandler::close to the caller. + 2002-07-25 Christopher Faylor * security.cc (allow_ntsec): Default to on. diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 4fc875a9b..f2e5e2145 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -533,7 +533,7 @@ fhandler_registry::close () } if (value_name) cfree (value_name); - return 0; + return res; } bool diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index f2d7b1999..7efe14fd1 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -578,9 +578,8 @@ _close (int fd) res = -1; else { - cfd->close (); + res = cfd->close (); cfd.release (); - res = 0; } syscall_printf ("%d = close (%d)", res, fd);