Changed start/stop scripts

This commit is contained in:
Michiel Broek
2003-12-06 20:52:58 +00:00
parent df0e9ee03f
commit 1af9935914
10 changed files with 266 additions and 149 deletions

View File

@@ -652,6 +652,7 @@ int checktasks(int onsig)
void die(int onsig)
{
int i, count;
time_t now;
T_Shutdown = TRUE;
signal(onsig, SIG_IGN);
@@ -692,7 +693,12 @@ void die(int onsig)
if (cmd_run || ping_run)
Syslog('+', "Waiting for threads to stop");
while (cmd_run || ping_run) {
/*
* Wait at most 2 seconds for the threads, internal they are
* build to stop within a second.
*/
now = time(NULL) + 2;
while ((cmd_run || ping_run) && (time(NULL) < now)) {
sleep(1);
}