12 static void do_sso_sockets(void)
14 struct sockopt so
= { 0, 0, 0, 0 };
17 for (i
= 0; i
< nr_sockets
; i
++) {
20 fd
= shm
->sockets
[i
].fd
;
21 sso_socket(&shm
->sockets
[i
].triplet
, &so
, fd
);
28 if (no_files
== TRUE
) /* We don't regenerate sockets */
31 /* we're about to exit. */
32 if (shm
->spawn_no_more
)
35 shm
->regenerating
= TRUE
;
37 sleep(1); /* give children time to finish with fds. */
41 output(0, "Regenerating random pages, fd's etc.\n");
45 /* Do random setsockopts on all network sockets. */
46 /* FIXME: Disabled for now.
48 * There's a problem if we have a child doing a read on a socket that blocks
49 * (like some weirdo ax25 socket for eg). The setsockopt will block on it.
51 * I'm not sure what to do about this problem yet.
52 * Maybe try waiting for nr_children to drop to zero when need_regenerate == 1 ?
56 destroy_shared_mappings();
57 setup_shared_mappings();
59 generate_random_page(page_rand
);
61 shm
->regenerating
= FALSE
;