dump_heap();
#endif
+ /* If the operator requested a halt but not an exit, halt here. */
+ if (shutdown_and_halt) {
+ lprintf(CTDL_NOTICE, "citserver: Halting server without exiting.\n");
+ fflush(stdout); fflush(stderr);
+ while(1) {
+ sleep(32767);
+ }
+ }
+
/* Now go away. */
lprintf(CTDL_NOTICE, "citserver: Exiting with status %d\n", exitcode);
fflush(stdout); fflush(stderr);
time_to_die = 1;
}
+/*
+ * Halt the server without exiting the server process.
+ */
+void cmd_halt(void) {
+
+ if (CtdlAccessCheck(ac_aide)) return;
+
+ cprintf("%d Halting server. Goodbye.\n", CIT_OK);
+ time_to_die = 1;
+ shutdown_and_halt = 1;
+}
+
/*
* Schedule or cancel a server shutdown
*/
cmd_down();
}
+ else if (!strncasecmp(cmdbuf,"HALT",4)) {
+ cmd_halt();
+ }
+
else if (!strncasecmp(cmdbuf,"SCDN",4)) {
cmd_scdn(&cmdbuf[5]);
}