]> git.pond.sub.org Git - empserver/commitdiff
Implement wakeup of shutdown thread in shutdown_initiate()
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 20 Jul 2008 14:22:46 +0000 (10:22 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 25 Jul 2008 12:16:38 +0000 (08:16 -0400)
Before, the shutdown command's action could be delayed by up to a
minute when the shutdown thread was already running.

src/server/shutdown.c

index f7fb456c54733210d5167b9ab18326f45f05b11a..690e59aebf5cca2144ac89999a50e55e84212008 100644 (file)
@@ -71,7 +71,7 @@ shutdown_initiate(int mins_from_now)
        if (old_pending)
            pr_wall("The shutdown time has been changed to %d minutes!\n",
                    mins_from_now);
        if (old_pending)
            pr_wall("The shutdown time has been changed to %d minutes!\n",
                    mins_from_now);
-       /* FIXME wake up shutdown_sequence() */
+       empth_wakeup(shutdown_thread);
     } else {
        shutdown_thread = empth_create(shutdown_sequence, 50 * 1024, 0,
                                       "shutdownSeq", NULL);
     } else {
        shutdown_thread = empth_create(shutdown_sequence, 50 * 1024, 0,
                                       "shutdownSeq", NULL);