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/fhandler_process.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fhandler_process.cc') diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index f374d4d98..0ad729499 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -74,8 +74,9 @@ static bool get_mem_values(DWORD dwProcessId, unsigned long *vmsize, unsigned lo * <0 if path is a file. */ int -fhandler_process::exists (const char *path) +fhandler_process::exists () { + const char *path = get_name (); debug_printf ("exists (%s)", path); path += proc_len + 1; while (*path != 0 && !SLASH_P (*path)) @@ -98,7 +99,7 @@ int fhandler_process::fstat (struct __stat64 *buf, path_conv *pc) { const char *path = get_name (); - int file_type = exists (path); + int file_type = exists (); (void) fhandler_base::fstat (buf, pc); path += proc_len + 1; int pid = atoi (path); -- cgit v1.2.3