From fc240f584b02d8bb1a2bb60927c3d13b583c68a1 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 22 May 2002 22:09:58 +0000 Subject: * fhandler.h (fhandler_virtual::exists): Eliminate path argument. (fhandler_proc::exists): Ditto. (fhandler_registry::exists): Ditto. (fhandler_process::exists): Ditto. * fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name. * fhandler_process.cc (fhandler_process::exists): Ditto. (fstat): Ditto. * fhandler_registry.cc (fhandler_registry::exists): Ditto. (fhandler_registry::fstat): Ditto. * fhandler_virtual.cc (fhandler_virtual::opendir): Ditto. * path.cc (path_conv::check): Ditto. Add debugging. * syscalls.cc (dup): Always call dup2 for error handling. --- winsup/cygwin/syscalls.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'winsup/cygwin/syscalls.cc') diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 2eb09017b..24d44bb8e 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -83,15 +83,7 @@ check_pty_fds (void) int dup (int fd) { - int res; - cygheap_fdnew newfd; - - if (newfd < 0) - res = -1; - else - res = dup2 (fd, newfd); - - return res; + return cygheap->fdtab.dup2 (fd, cygheap_fdnew ()); } int -- cgit v1.2.3