summaryrefslogtreecommitdiff
path: root/win32/win32sck.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-10-09 18:46:54 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-10-09 18:46:54 +0000
commita10b7b7eee64efea010bfdba91243503341ba68d (patch)
treec315197cd8aec67ebf6d490e93848a5b39ed8dc0 /win32/win32sck.c
parent9afd7f9460d27680225b1fcfc96bc64f179140fc (diff)
downloadperl-a10b7b7eee64efea010bfdba91243503341ba68d.tar.gz
on Windows, avoid potential exception (could happen if MSVCRT isn't
being used) when closing a socket handle p4raw-id: //depot/perl@7173
Diffstat (limited to 'win32/win32sck.c')
-rw-r--r--win32/win32sck.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/win32sck.c b/win32/win32sck.c
index 0ce53c376b..594a2e3099 100644
--- a/win32/win32sck.c
+++ b/win32/win32sck.c
@@ -431,6 +431,7 @@ my_fclose (FILE *pf)
win32_fflush(pf);
err = closesocket(osf);
if (err == 0) {
+ _set_osfhnd(fileno(pf), INVALID_HANDLE_VALUE);
(void)fclose(pf); /* handle already closed, ignore error */
return 0;
}