From ce67f2977ec5ce78a9b1722868a9fddcd39feb96 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Tue, 24 Sep 2002 14:24:46 +0000 Subject: [PATCH] Bug 168993: PR_Poll should clear out_flags for null fd's. r=jgmyers. Modified files: bfile.c os2poll.c uxpoll.c w32poll.c ptio.c --- nsprpub/pr/src/md/beos/bfile.c | 4 ++++ nsprpub/pr/src/md/os2/os2poll.c | 4 ++++ nsprpub/pr/src/md/unix/uxpoll.c | 5 +++++ nsprpub/pr/src/md/windows/w32poll.c | 4 ++++ nsprpub/pr/src/pthreads/ptio.c | 5 +++++ 5 files changed, 22 insertions(+) diff --git a/nsprpub/pr/src/md/beos/bfile.c b/nsprpub/pr/src/md/beos/bfile.c index 38da1f33caeb..6fd6cce93fd9 100644 --- a/nsprpub/pr/src/md/beos/bfile.c +++ b/nsprpub/pr/src/md/beos/bfile.c @@ -673,6 +673,10 @@ _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) } } } + else + { + pd->out_flags = 0; + } } if (0 != ready) return ready; /* no need to block */ diff --git a/nsprpub/pr/src/md/os2/os2poll.c b/nsprpub/pr/src/md/os2/os2poll.c index da477b1bbfc2..0b9c0de6a8bd 100644 --- a/nsprpub/pr/src/md/os2/os2poll.c +++ b/nsprpub/pr/src/md/os2/os2poll.c @@ -214,6 +214,10 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) } } } + else + { + pd->out_flags = 0; + } } if (0 != ready) diff --git a/nsprpub/pr/src/md/unix/uxpoll.c b/nsprpub/pr/src/md/unix/uxpoll.c index 56a0d3dc2657..c504cd4d5f43 100644 --- a/nsprpub/pr/src/md/unix/uxpoll.c +++ b/nsprpub/pr/src/md/unix/uxpoll.c @@ -173,6 +173,7 @@ static PRInt32 NativeThreadPoll( { /* make poll() ignore this entry */ syspoll[index].fd = -1; + pds[index].out_flags = 0; } } @@ -384,6 +385,10 @@ static PRInt32 NativeThreadSelect( } } } + else + { + pd->out_flags = 0; + } } if (0 != ready) return ready; /* no need to block */ diff --git a/nsprpub/pr/src/md/windows/w32poll.c b/nsprpub/pr/src/md/windows/w32poll.c index 2747a0408f51..9c4836f3d6b4 100644 --- a/nsprpub/pr/src/md/windows/w32poll.c +++ b/nsprpub/pr/src/md/windows/w32poll.c @@ -223,6 +223,10 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) } } } + else + { + pd->out_flags = 0; + } } if (0 != ready) return ready; /* no need to block */ diff --git a/nsprpub/pr/src/pthreads/ptio.c b/nsprpub/pr/src/pthreads/ptio.c index 2934449129ec..65ba62549571 100644 --- a/nsprpub/pr/src/pthreads/ptio.c +++ b/nsprpub/pr/src/pthreads/ptio.c @@ -3824,6 +3824,7 @@ static PRInt32 _pr_poll_with_poll( { /* make poll() ignore this entry */ syspoll[index].fd = -1; + pds[index].out_flags = 0; } } if (0 == ready) @@ -4085,6 +4086,10 @@ static PRInt32 _pr_poll_with_select( } } } + else + { + pds[index].out_flags = 0; + } } if (0 == ready) {