* fhandler.h (fhandler_base::hclose): New virtual method.

(fhandler_base::set_inheritance): Make this a method so that we can use the
appropriate close methods.
* fhandler.cc (fhandler_base::set_inheritance): Ditto.
* path.cc (normalize_posix_path): Eliminate /.  trailing path component.
This commit is contained in:
Christopher Faylor
2000-04-20 04:38:10 +00:00
parent f06a3648d5
commit d7aac2acf5
4 changed files with 34 additions and 21 deletions

View File

@ -1427,8 +1427,8 @@ fhandler_pipe::lseek (off_t offset, int whence)
return -1;
}
void __stdcall
set_inheritance (HANDLE &h, int not_inheriting, const char *name)
void
fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *name)
{
HANDLE newh;
@ -1438,16 +1438,17 @@ set_inheritance (HANDLE &h, int not_inheriting, const char *name)
#ifndef DEBUGGING
else
{
CloseHandle (h);
hclose (h);
h = newh;
}
#else
else if (!name)
{
CloseHandle (h);
hclose (h);
h = newh;
}
else
/* FIXME: This won't work with sockets */
{
ForceCloseHandle2 (h, name);
h = newh;