FreeBSD/usr.sbin/jail/command.c
/*
 * Remove any processes from the hash that correspond to a jail.
 */
Remove any processes from the hash that correspond to a jail.
Remove any processes from the hash that correspond to a jail .
static void
clear_procs(struct cfjail *j)
{
	struct kevent ke;
	struct phash *ph, *tph;
	int i;
	j->nprocs = 0;
	for (i = 0; i < PHASH_SIZE; i++)
		LIST_FOREACH_SAFE(ph, &phash[i], le, tph)
			if (ph->j == j) {
				EV_SET(&ke, ph->pid, EVFILT_PROC, EV_DELETE,
				    NOTE_EXIT, 0, NULL);
				(void)kevent(kq, &ke, 1, NULL, 0, NULL);
				LIST_REMOVE(ph, le);
				free(ph);
			}
}
static void clear_procs ( struct cfjail * j ) { struct kevent ke ; struct phash * ph , * tph ; int i ; j -> nprocs = 0 ; for ( i = 0 ; i < PHASH_SIZE ; i ++ ) LIST_FOREACH_SAFE ( ph , & phash [ i ] , le , tph ) if ( ph -> j == j ) { EV_SET ( & ke , ph -> pid , EVFILT_PROC , EV_DELETE , NOTE_EXIT , 0 , NULL ) ; ( void ) kevent ( kq , & ke , 1 , NULL , 0 , NULL ) ; LIST_REMOVE ( ph , le ) ; free ( ph ) ; } }
Remove any processes from the hash that correspond to a jail.
Remove any processes from the hash that correspond to a jail .