diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-25 21:26:54 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2000-11-25 21:26:54 +0000 |
commit | 24c23ab4f49a594279883afef247c728d1f5a636 (patch) | |
tree | 9ae4d36ee829aef06abaa8ff5d6c90d1de40487b /perlio.c | |
parent | a77df51f3c9319336e0ec43ad003b02a0111d2af (diff) | |
parent | cf829ab07ccc67cf02ca41d6f870136b64d83833 (diff) | |
download | perl-24c23ab4f49a594279883afef247c728d1f5a636.tar.gz |
Integrate mainline.
p4raw-id: //depot/perlio@7859
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1449,8 +1449,12 @@ PerlIOStdio_tell(PerlIO *f) IV PerlIOStdio_close(PerlIO *f) { + int optval, optlen = sizeof(int); FILE *stdio = PerlIOSelf(f,PerlIOStdio)->stdio; - return fclose(stdio); + return( + (getsockopt(PerlIO_fileno(f), SOL_SOCKET, SO_TYPE, (char *)&optval, &optlen) < 0) ? + fclose(stdio) : + close(PerlIO_fileno(f))); } IV |