1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

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
This commit is contained in:
Florian Smeets 2011-09-10 10:35:10 +00:00
parent 2b65c7232d
commit c0726af5b1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=281574
2 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= nspr
DISTVERSION= 4.8.8
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= MOZILLA
MASTER_SITE_SUBDIR= nspr/releases/v${PORTVERSION}/src

View File

@ -0,0 +1,11 @@
--- ../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);