ports/devel/nspr/files/patch-bugzilla-684758
Florian Smeets c0726af5b1 add a patch which prevents firefox from using 100% cpu.
FreeBSD sets POLLHUP in case a connect failed and the socket has never been
connected. NSPR should also check for this.

The patch has already been committed upstream. Bugzilla ID 684758

PR:		ports/156889
Analyzed by:	avg
Patch by:	avg
Approved by:	kwm
2011-09-10 10:35:10 +00:00

11 lines
495 B
Text

--- ../pr/src/pthreads/ptio.c 2011-09-02 12:14:24.000000000 +0200
+++ ../pr/src/pthreads/ptio.c 2011-09-02 12:14:27.000000000 +0200
@@ -1635,7 +1635,7 @@
PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0);
return PR_FAILURE;
}
- if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0)
+ if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR | PR_POLL_HUP)) == 0)
{
PR_ASSERT(out_flags == 0);
PR_SetError(PR_IN_PROGRESS_ERROR, 0);