From: Nick Ing-Simmons Date: Tue, 18 Jun 2002 07:03:08 +0000 (+0000) Subject: Slight improvement to :win32 layer X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=755e775944b8eceb91d29ebca620c9e5cf122f30;p=p5sagit%2Fp5-mst-13.2.git Slight improvement to :win32 layer p4raw-id: //depot/perlio@17280 --- diff --git a/win32/win32io.c b/win32/win32io.c index 4e61aaa..3cf31c5 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; }