summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2002-06-18 07:03:08 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2002-06-18 07:03:08 +0000
commit755e775944b8eceb91d29ebca620c9e5cf122f30 (patch)
treefdfa97c6cdb513c6b3e455c5cd6671931679cfbc /win32
parent1cbfc93d1589e4f5f6103e097177be6f791b2cb2 (diff)
downloadperl-755e775944b8eceb91d29ebca620c9e5cf122f30.tar.gz
Slight improvement to :win32 layer
p4raw-id: //depot/perlio@17280
Diffstat (limited to 'win32')
-rw-r--r--win32/win32io.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/win32/win32io.c b/win32/win32io.c
index 4e61aaa5f7..3cf31c5629 100644
--- a/win32/win32io.c
+++ b/win32/win32io.c
@@ -288,13 +288,19 @@ PerlIOWin32_close(pTHX_ PerlIO *f)
PerlIOWin32 *s = PerlIOSelf(f,PerlIOWin32);
if (s->refcnt == 1)
{
- if (CloseHandle(s->h))
+ IV code = 0;
+#if 0
+ /* This does not do pipes etc. correctly */
+ if (!CloseHandle(s->h))
{
s->h = INVALID_HANDLE_VALUE;
return -1;
}
+#else
+ PerlIOBase(f)->flags &= ~PERLIO_F_OPEN;
+ return win32_close(s->fd);
+#endif
}
- PerlIOBase(f)->flags &= ~PERLIO_F_OPEN;
return 0;
}