FreeBSD/usr.sbin/inetd/inetd.c
/*
 * Record a new child pid for this service. If we've reached the
 * limit on children, then stop accepting incoming requests.
 */
Record a new child pid for this service. If we've reached the
limit on children, then stop accepting incoming requests.
Record a new child pid for this service . If we ' ve reached the limit on children then stop accepting incoming requests .
void
addchild(struct servtab *sep, pid_t pid)
{
	if (sep->se_maxchild <= 0)
		return;
#ifdef SANITY_CHECK
	if (sep->se_numchild >= sep->se_maxchild) {
		syslog(LOG_ERR, "%s: %d >= %d",
		    __func__, sep->se_numchild, sep->se_maxchild);
		exit(EX_SOFTWARE);
	}
#endif
	sep->se_pids[sep->se_numchild++] = pid;
	if (sep->se_numchild == sep->se_maxchild)
		disable(sep);
}
void addchild ( struct servtab * sep , pid_t pid ) { if ( sep -> se_maxchild <= 0 ) return ; #ifdef SANITY_CHECK if ( sep -> se_numchild >= sep -> se_maxchild ) { syslog ( LOG_ERR , " " , __func__ , sep -> se_numchild , sep -> se_maxchild ) ; exit ( EX_SOFTWARE ) ; } #endif sep -> se_pids [ sep -> se_numchild ++ ] = pid ; if ( sep -> se_numchild == sep -> se_maxchild ) disable ( sep ) ; }
Record a new child pid for this service.
Record a new child pid for this service .