diff --git a/src/server/connections.c b/src/server/connections.c index c2e05a17ccb99ce8ab49d0bbdb320443bc6c493b..e739e2c85773ab9ad6beb4dc77b5eff15cea48d2 100644 --- a/src/server/connections.c +++ b/src/server/connections.c @@ -1,5 +1,5 @@ /* - * $Id: connections.c,v 0.98 2003/07/13 11:07:24 ceder Exp $ + * $Id: connections.c,v 0.99 2003/07/13 11:56:27 ceder Exp $ * Copyright (C) 1991-2002 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -94,7 +94,7 @@ Connection * active_connection = NULL; * privileges issues a `shutdown', or of lyskomd receives a SIGHUP. * This not an abort: all data is saved before we exit. */ -volatile sig_atomic_t go_and_die = 0; +Bool go_and_die = FALSE; /* * The number of times that the session penalties has been averaged. @@ -907,7 +907,7 @@ check_idle_callback(oop_source *UNUSED(source), is_idle = FALSE; ++penalty_generation; - for (next = queue_first; next != NULL; ) + for (next = queue_first; next != NULL && !go_and_die; ) { c = next; next = next->queue_next; @@ -924,7 +924,8 @@ check_idle_callback(oop_source *UNUSED(source), if (!is_idle) enable_idle_check(); - return OOP_CONTINUE; + /* Check if a client issued a shutdown command. */ + return go_and_die ? OOP_HALT : OOP_CONTINUE; } static void *