Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/newsyslog/newsyslog.c
Show First 20 Lines • Show All 327 Lines • ▼ Show 20 Lines | main(int argc, char **argv) | ||||
* Note that zipwork_entries include pointers to these | * Note that zipwork_entries include pointers to these | ||||
* sigwork_entry's, so we can not free the entries here. | * sigwork_entry's, so we can not free the entries here. | ||||
*/ | */ | ||||
if (!SLIST_EMPTY(&swhead)) { | if (!SLIST_EMPTY(&swhead)) { | ||||
if (noaction || verbose) | if (noaction || verbose) | ||||
printf("Signal all daemon process(es)...\n"); | printf("Signal all daemon process(es)...\n"); | ||||
SLIST_FOREACH(stmp, &swhead, sw_nextp) | SLIST_FOREACH(stmp, &swhead, sw_nextp) | ||||
do_sigwork(stmp); | do_sigwork(stmp); | ||||
if (!(rotatereq && nosignal)) { | |||||
if (noaction) | if (noaction) | ||||
printf("\tsleep 10\n"); | printf("\tsleep 10\n"); | ||||
else { | else { | ||||
if (verbose) | if (verbose) | ||||
printf("Pause 10 seconds to allow daemon(s)" | printf("Pause 10 seconds to allow " | ||||
" to close log file(s)\n"); | "daemon(s) to close log file(s)\n"); | ||||
sleep(10); | sleep(10); | ||||
} | |||||
} | } | ||||
} | } | ||||
/* | /* | ||||
* Compress all files that we're expected to compress, now | * Compress all files that we're expected to compress, now | ||||
* that all processes should have closed the files which | * that all processes should have closed the files which | ||||
* have been rotated. | * have been rotated. | ||||
*/ | */ | ||||
if (!SLIST_EMPTY(&zwhead)) { | if (!SLIST_EMPTY(&zwhead)) { | ||||
▲ Show 20 Lines • Show All 2,323 Lines • Show Last 20 Lines |