Initialize sockbits variable with FD_ZERO, to avoid passing a fd_set
with random garbage in lower bits corresponding to stdin, stdout and stderr to select(2). This fixes the problem with nfsd sometimes getting stuck in a tight select(2) loop eating 100% CPU time. Reviewed by: iedowse Approved by: obrien
This commit is contained in:
parent
ae5fafd8c8
commit
4cc03f63d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100499
@ -355,6 +355,7 @@ main(argc, argv, envp)
|
||||
(void)signal(SIGUSR1, cleanup);
|
||||
FD_ZERO(&v4bits);
|
||||
FD_ZERO(&v6bits);
|
||||
FD_ZERO(&sockbits);
|
||||
|
||||
rpcbregcnt = 0;
|
||||
/* Set up the socket for udp and rpcb register it. */
|
||||
|
Loading…
Reference in New Issue
Block a user