Exemple #1
0
void regenerate(void)
{
	if (no_files == TRUE)	/* We don't regenerate sockets */
		return;

	/* we're about to exit. */
	if (shm->spawn_no_more)
		return;

	shm->regenerating = TRUE;

	sleep(1);	/* give children time to finish with fds. */

	shm->regenerate = 0;

	output(0, "Regenerating random pages, fd's etc.\n");

	regenerate_fds();

	/* Do random setsockopts on all network sockets. */
	do_sso_sockets();

	destroy_maps();
	setup_maps();

	generate_random_page(page_rand);

	shm->regenerating = FALSE;
}
Exemple #2
0
static void regenerate(void)
{
	if (no_files == TRUE)	/* We don't regenerate sockets */
		return;

	shm->regenerating = TRUE;

	sleep(1);	/* give children time to finish with fds. */

	shm->regenerate = 0;

	output(0, "[%d] Regenerating random pages, fd's etc.\n", getpid());

	regenerate_fds();

	destroy_maps();
	setup_maps();

	generate_random_page(page_rand);

	shm->regenerating = FALSE;
}