src/usr.sbin/mountd/mountd.c
/*
 * Clear out sockets after a failure to bind one of them, so that the
 * cycle of socket creation/binding can start anew.
 */
Clear out sockets after a failure to bind one of them, so that the
cycle of socket creation/binding can start anew.
Clear out sockets after a failure to bind one of them so that the cycle of socket creation / binding can start anew .
static void
clearout_service(void)
{
	int i;
	for (i = 0; i < sock_fdcnt; i++) {
		if (sock_fd[i] >= 0) {
			shutdown(sock_fd[i], SHUT_RDWR);
			close(sock_fd[i]);
		}
	}
}
static void clearout_service ( void ) { int i ; for ( i = 0 ; i < sock_fdcnt ; i ++ ) { if ( sock_fd [ i ] >= 0 ) { shutdown ( sock_fd [ i ] , SHUT_RDWR ) ; close ( sock_fd [ i ] ) ; } } }
Clear out sockets after a failure to bind one of them, so that the
 cycle of socket creation/binding can start anew.
Clear out sockets after a failure to bind one of them so that the cycle of socket creation / binding can start anew .