summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2001-06-20 22:53:38 +0000
committerwtc%netscape.com <devnull@localhost>2001-06-20 22:53:38 +0000
commit23c0e33d7560fbf2fe9e634a6cfd8579b0fdba19 (patch)
tree3483b727932f40eadbfb6f39507f93de28993c4c
parentd5072aed25996f926839ea9694f1527f276414e8 (diff)
downloadnspr-hg-23c0e33d7560fbf2fe9e634a6cfd8579b0fdba19.tar.gz
Bugzilla bug #86941: worked around a TCP socket close() bug in Tru64
UNIX V5.1.
-rw-r--r--pr/src/pthreads/ptio.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
index ec5b8921..9c72d5d1 100644
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -1142,8 +1142,26 @@ static PRStatus pt_Close(PRFileDesc *fd)
{
if (-1 == close(fd->secret->md.osfd))
{
+#ifdef OSF1
+ /*
+ * Bug 86941: On Tru64 UNIX V5.0A and V5.1, the close()
+ * system call, when called to close a TCP socket, may
+ * return -1 with errno set to EINVAL but the system call
+ * does close the socket successfully. An application
+ * may safely ignore the EINVAL error. This bug is fixed
+ * on Tru64 UNIX V5.1A and later. The defect tracking
+ * number is QAR 81431.
+ */
+ if (PR_DESC_SOCKET_TCP != fd->methods->file_type
+ || EINVAL != errno)
+ {
+ pt_MapError(_PR_MD_MAP_CLOSE_ERROR, errno);
+ return PR_FAILURE;
+ }
+#else
pt_MapError(_PR_MD_MAP_CLOSE_ERROR, errno);
return PR_FAILURE;
+#endif
}
fd->secret->state = _PR_FILEDESC_CLOSED;
}