FreeBSD/usr.sbin/inetd/inetd.c
/*
 * Finish with a service and its socket.
 */
Finish with a service and its socket.
Finish with a service and its socket .
void
close_sep(struct servtab *sep)
{
	if (sep->se_fd >= 0) {
		if (FD_ISSET(sep->se_fd, &allsock))
			disable(sep);
		(void) close(sep->se_fd);
		sep->se_fd = -1;
	}
	sep->se_count = 0;
	sep->se_numchild = 0;	
}
void close_sep ( struct servtab * sep ) { if ( sep -> se_fd >= 0 ) { if ( FD_ISSET ( sep -> se_fd , & allsock ) ) disable ( sep ) ; ( void ) close ( sep -> se_fd ) ; sep -> se_fd = -1 ; } sep -> se_count = 0 ; sep -> se_numchild = 0 ; }
Finish with a service and its socket.
Finish with a service and its socket .
/* forget about any existing children */