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
7dd5d080be
commit
751552f6c8
@ -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…
x
Reference in New Issue
Block a user