aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-04-20 04:38:10 +0000
committerChristopher Faylor <me@cgf.cx>2000-04-20 04:38:10 +0000
commitd7aac2acf575eeb41356fa33bae86037e1f9a6ea (patch)
tree4e5e4eec3e1c06ed1fa68e2ae7f4a85eb005917d /winsup/cygwin/fhandler.cc
parentf06a3648d543c404968edde157414ce3ee6a8770 (diff)
downloadnewlib-d7aac2acf575eeb41356fa33bae86037e1f9a6ea.zip
newlib-d7aac2acf575eeb41356fa33bae86037e1f9a6ea.tar.gz
newlib-d7aac2acf575eeb41356fa33bae86037e1f9a6ea.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 1003815..f135b99 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -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;