diff --git a/crm/cib/cibmain.c b/crm/cib/cibmain.c deleted file mode 100644 index 4fef6f7e57..0000000000 --- a/crm/cib/cibmain.c +++ /dev/null @@ -1,274 +0,0 @@ -/* $Id: cibmain.c,v 1.26 2004/09/04 10:41:55 andrew Exp $ */ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -/* #include */ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -/* #define REALTIME_SUPPORT 0 */ -#define PID_FILE WORKING_DIR"/cib.pid" -#define DAEMON_LOG LOG_DIR"/cib.log" -#define DAEMON_DEBUG LOG_DIR"/cib.debug" - -GMainLoop* mainloop = NULL; -const char* crm_system_name = CRM_SYSTEM_CIB; - -void usage(const char* cmd, int exit_status); -int init_start(void); -void cib_shutdown(int nsig); -gboolean cib_msg_callback(IPC_Channel *client, gpointer user_data); -gboolean process_maincib_message(xmlNodePtr msg, IPC_Channel *sender); - -#define OPTARGS "skrh" - -int -main(int argc, char ** argv) -{ - - int req_comms_restart = FALSE; - int req_restart = FALSE; - int req_status = FALSE; - int req_stop = FALSE; - int argerr = 0; - int flag; - - /* Redirect messages from glib functions to our handler */ - g_log_set_handler(NULL, - G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL - | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE - | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG - | G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL, - cl_glib_msg_handler, NULL); - /* and for good measure... */ - g_log_set_always_fatal((GLogLevelFlags)0); - - cl_log_set_entity(crm_system_name); - cl_log_set_facility(LOG_USER); - cl_log_set_logfile(DAEMON_LOG); - cl_log_set_debugfile(DAEMON_DEBUG); - CL_SIGNAL(DEBUG_INC, alter_debug); - CL_SIGNAL(DEBUG_DEC, alter_debug); - - while ((flag = getopt(argc, argv, OPTARGS)) != EOF) { - switch(flag) { - case 's': /* Status */ - req_status = TRUE; - break; - case 'k': /* Stop (kill) */ - req_stop = TRUE; - break; - case 'r': /* Restart */ - req_restart = TRUE; - break; - case 'c': /* Restart */ - req_comms_restart = TRUE; - break; - case 'h': /* Help message */ - usage(crm_system_name, LSB_EXIT_OK); - break; - default: - ++argerr; - break; - } - } - - if (optind > argc) { - ++argerr; - } - - if (argerr) { - usage(crm_system_name,LSB_EXIT_GENERIC); - } - - /* read local config file */ - - if (req_status){ - return init_status(PID_FILE, crm_system_name); - } - - if (req_stop){ - return init_stop(PID_FILE); - } - - if (req_restart) { - init_stop(PID_FILE); - } - - return init_start(); -} - - -int -init_start(void) -{ - long pid; - ll_cluster_t *hb_fd; - int facility; - IPC_Channel *crm_ch = NULL; -#ifdef REALTIME_SUPPORT - static int crm_realtime = 1; -#endif - - if ((pid = get_running_pid(PID_FILE, NULL)) > 0) { - crm_crit("already running: [pid %ld].", pid); - exit(LSB_EXIT_OK); - } - - crm_info("Register PID"); - register_pid(PID_FILE, FALSE, cib_shutdown); - - cl_log_set_logfile(DAEMON_LOG); -/* if (crm_verbose()) { */ - cl_log_set_debugfile(DAEMON_DEBUG); -/* } */ - - hb_fd = ll_cluster_new("heartbeat"); - - crm_info("Switching to Heartbeat logger"); - if ((facility = hb_fd->llc_ops->get_logfacility(hb_fd))>0) { - cl_log_set_facility(facility); - } - - if(startCib(CIB_FILENAME) == FALSE){ - crm_crit("Cannot start CIB... terminating"); - exit(1); - } - - crm_ch = init_client_ipc_comms(CRM_SYSTEM_CRMD, - subsystem_input_dispatch, - (void*)process_maincib_message); - - if(crm_ch != NULL) { - send_hello_message(crm_ch, "-", CRM_SYSTEM_CIB, "0", "1"); - - /* Create the mainloop and run it... */ - mainloop = g_main_new(FALSE); - crm_info("Starting %s", crm_system_name); - -#ifdef REALTIME_SUPPORT - if (crm_realtime == 1) { - cl_enable_realtime(); - } else if (crm_realtime == 0) { - cl_disable_realtime(); - } - cl_make_realtime(SCHED_RR, 5, 64, 64); -#endif - - g_main_run(mainloop); - return_to_orig_privs(); - } else { - crm_err("Connection to CRM not valid, exiting."); - } - - - if (unlink(PID_FILE) == 0) { - crm_info("[%s] stopped", crm_system_name); - } - return 0; -} - -gboolean -process_maincib_message(xmlNodePtr msg, IPC_Channel *sender) -{ - const char *op = get_xml_attr (msg, XML_TAG_OPTIONS, - XML_ATTR_OP, FALSE); - - const char *sys_to = xmlGetProp(msg, XML_ATTR_SYSTO); - - crm_debug("Processing %s message", op); - - if(safe_str_eq(xmlGetProp(msg, XML_ATTR_MSGTYPE), XML_ATTR_REQUEST)) { - crm_info("Message was a response not a request." - " Discarding"); - - } else if (strcmp(sys_to, CRM_SYSTEM_CIB) == 0 - || strcmp(sys_to, CRM_SYSTEM_DCIB) == 0) { - - xmlNodePtr answer = process_cib_message(msg, TRUE); - if (send_xmlipc_message(sender, answer)==FALSE) - crm_warn("Cib answer could not be sent"); - free_xml(answer); - - } else { - crm_warn("Received a message destined for %s by mistake", - sys_to); - return FALSE; - } - - return TRUE; -} - - - -void -usage(const char* cmd, int exit_status) -{ - FILE* stream; - - stream = exit_status ? stderr : stdout; - - fprintf(stream, "usage: %s [-srkh]" - "[-c configure file]\n", cmd); -/* fprintf(stream, "\t-d\tsets debug level\n"); */ -/* fprintf(stream, "\t-s\tgets daemon status\n"); */ -/* fprintf(stream, "\t-r\trestarts daemon\n"); */ -/* fprintf(stream, "\t-k\tstops daemon\n"); */ -/* fprintf(stream, "\t-h\thelp message\n"); */ - fflush(stream); - - exit(exit_status); -} - -void -cib_shutdown(int nsig) -{ - static int shuttingdown = 0; - CL_SIGNAL(nsig, cib_shutdown); - - if (!shuttingdown) { - shuttingdown = 1; - } - if (mainloop != NULL && g_main_is_running(mainloop)) { - g_main_quit(mainloop); - } else { - exit(LSB_EXIT_OK); - } -} diff --git a/crm/crmd/crmdmain.c b/crm/crmd/crmdmain.c deleted file mode 100644 index b8bddd83d0..0000000000 --- a/crm/crmd/crmdmain.c +++ /dev/null @@ -1,221 +0,0 @@ -/* $Id: crmdmain.c,v 1.26 2004/09/04 10:41:54 andrew Exp $ */ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include - -const char* crm_system_name = SYS_NAME; -#define OPTARGS "skrhV" - -void usage(const char* cmd, int exit_status); -int init_start(void); -void crmd_hamsg_callback(const struct ha_msg* msg, void* private_data); -gboolean crmd_tickle_apphb(gpointer data); - -GMainLoop* crmd_mainloop = NULL; - -int -main(int argc, char ** argv) -{ - int req_restart = FALSE; - int req_status = FALSE; - int req_stop = FALSE; - int argerr = 0; - int flag; - -#ifdef DEVEL_DIR - mkdir(DEVEL_DIR, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); -#endif - - /* Redirect messages from glib functions to our handler */ - g_log_set_handler(NULL, - G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL - | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE - | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG - | G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL, - cl_glib_msg_handler, NULL); - /* and for good measure... */ - g_log_set_always_fatal((GLogLevelFlags)0); - - cl_log_set_entity(crm_system_name); - cl_log_set_logfile(DAEMON_LOG); - cl_log_set_debugfile(DAEMON_DEBUG); - cl_log_set_facility(LOG_USER); - CL_SIGNAL(DEBUG_INC, alter_debug); - CL_SIGNAL(DEBUG_DEC, alter_debug); - - while ((flag = getopt(argc, argv, OPTARGS)) != EOF) { - switch(flag) { - case 'V': - alter_debug(DEBUG_INC); - break; - case 's': /* Status */ - req_status = TRUE; - break; - case 'k': /* Stop (kill) */ - req_stop = TRUE; - break; - case 'r': /* Restart */ - req_restart = TRUE; - break; - case 'h': /* Help message */ - usage(crm_system_name, LSB_EXIT_OK); - break; - default: - ++argerr; - break; - } - } - - if (optind > argc) { - ++argerr; - } - - if (argerr) { - usage(crm_system_name,LSB_EXIT_GENERIC); - } - - /* read local config file */ - - if (req_status){ - return init_status(PID_FILE, crm_system_name); - } - - if (req_stop){ - return init_stop(PID_FILE); - } - - if (req_restart) { - init_stop(PID_FILE); - } - - return init_start(); -} - - -int -init_start(void) -{ - long pid; - enum crmd_fsa_state state; - - if ((pid = get_running_pid(PID_FILE, NULL)) > 0) { - crm_crit("already running: [pid %ld].", pid); - exit(LSB_EXIT_OK); - } - - fsa_state = S_PENDING; - state = s_crmd_fsa(C_STARTUP, I_STARTUP, NULL); - - if (state == S_PENDING) { - /* Create the mainloop and run it... */ - crmd_mainloop = g_main_new(FALSE); - crm_info("Starting %s", crm_system_name); - -#ifdef REALTIME_SUPPORT - static int crm_realtime = 1; - if (crm_realtime == 1){ - cl_enable_realtime(); - }else if (crm_realtime == 0){ - cl_disable_realtime(); - } - cl_make_realtime(SCHED_RR, 5, 64, 64); -#endif - - g_main_run(crmd_mainloop); - return_to_orig_privs(); - } else { - - crm_err("Startup of CRMd failed. Current state: %s", - fsa_state2string(state)); - - } - - - if (unlink(PID_FILE) == 0) { - crm_info("[%s] stopped", crm_system_name); - } - - return state != S_PENDING; -} - - - -void -usage(const char* cmd, int exit_status) -{ - FILE* stream; - - stream = exit_status ? stderr : stdout; - - fprintf(stream, "usage: %s [-srkh]" - "[-c configure file]\n", cmd); -/* fprintf(stream, "\t-d\tsets debug level\n"); */ -/* fprintf(stream, "\t-s\tgets daemon status\n"); */ -/* fprintf(stream, "\t-r\trestarts daemon\n"); */ -/* fprintf(stream, "\t-k\tstops daemon\n"); */ -/* fprintf(stream, "\t-h\thelp message\n"); */ - fflush(stream); - - exit(exit_status); -} - - -gboolean -crmd_tickle_apphb(gpointer data) -{ - char app_instance[APPNAME_LEN]; - int rc = 0; - sprintf(app_instance, "%s_%ld", crm_system_name, (long)getpid()); - - rc = apphb_hb(); - if (rc < 0) { - cl_perror("%s apphb_hb failure", app_instance); - exit(3); - } - return TRUE; -} diff --git a/crm/pengine/penginemain.c b/crm/pengine/penginemain.c deleted file mode 100644 index 093fb92abc..0000000000 --- a/crm/pengine/penginemain.c +++ /dev/null @@ -1,222 +0,0 @@ -/* $Id: penginemain.c,v 1.20 2004/08/30 03:17:39 msoffen Exp $ */ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#define SYS_NAME CRM_SYSTEM_PENGINE -#define OPTARGS "skrhV" -#define PID_FILE WORKING_DIR "/" SYS_NAME ".pid" -#define DAEMON_LOG DEVEL_DIR"/"SYS_NAME".log" -#define DAEMON_DEBUG DEVEL_DIR"/"SYS_NAME".debug" - -GMainLoop* mainloop = NULL; -const char* crm_system_name = SYS_NAME; - - -void usage(const char* cmd, int exit_status); -int init_start(void); -void pengine_shutdown(int nsig); -extern gboolean process_pe_message(xmlNodePtr msg, IPC_Channel *sender); - -int -main(int argc, char ** argv) -{ - int req_restart = FALSE; - int req_status = FALSE; - int req_stop = FALSE; - int argerr = 0; - int flag; - - cl_log_set_entity(crm_system_name); - cl_log_set_facility(LOG_USER); - - cl_log_set_logfile(DAEMON_LOG); - cl_log_set_debugfile(DAEMON_DEBUG); - CL_SIGNAL(DEBUG_INC, alter_debug); - CL_SIGNAL(DEBUG_DEC, alter_debug); - - while ((flag = getopt(argc, argv, OPTARGS)) != EOF) { - switch(flag) { - case 'V': - alter_debug(DEBUG_INC); - break; - case 's': /* Status */ - req_status = TRUE; - break; - case 'k': /* Stop (kill) */ - req_stop = TRUE; - break; - case 'r': /* Restart */ - req_restart = TRUE; - break; - case 'h': /* Help message */ - usage(crm_system_name, LSB_EXIT_OK); - break; - default: - ++argerr; - break; - } - } - - if (optind > argc) { - ++argerr; - } - - if (argerr) { - usage(crm_system_name,LSB_EXIT_GENERIC); - } - - /* read local config file */ - - if (req_status){ - return init_status(PID_FILE, crm_system_name); - } - - if (req_stop){ - return init_stop(PID_FILE); - } - - if (req_restart) { - init_stop(PID_FILE); - } - - return init_start(); - -} - - -int -init_start(void) -{ - long pid; - ll_cluster_t* hb_fd = NULL; - int facility; - IPC_Channel *crm_ch = NULL; -#ifdef REALTIME_SUPPORT - static int crm_realtime = 1; -#endif - - if ((pid = get_running_pid(PID_FILE, NULL)) > 0) { - crm_crit("already running: [pid %ld].", pid); - exit(LSB_EXIT_OK); - } - - /* change the logging facility to the one used by heartbeat daemon */ - hb_fd = ll_cluster_new("heartbeat"); - - crm_info("Switching to Heartbeat logger"); - if ((facility = hb_fd->llc_ops->get_logfacility(hb_fd))>0) { - cl_log_set_facility(facility); - } - - crm_info("Register PID"); - register_pid(PID_FILE, FALSE, pengine_shutdown); - - crm_ch = init_client_ipc_comms(CRM_SYSTEM_CRMD, - subsystem_input_dispatch, - (void*)process_pe_message); - - if(crm_ch != NULL) { - send_hello_message(crm_ch, "1234", CRM_SYSTEM_PENGINE, "0", "1"); - - /* Create the mainloop and run it... */ - mainloop = g_main_new(FALSE); - crm_info("Starting %s", crm_system_name); - - -#ifdef REALTIME_SUPPORT - if (crm_realtime == 1){ - cl_enable_realtime(); - }else if (crm_realtime == 0){ - cl_disable_realtime(); - } - cl_make_realtime(SCHED_RR, 5, 64, 64); -#endif - - g_main_run(mainloop); - - } else { - crm_err("Could not connect to the CRMd"); - } - - return_to_orig_privs(); - - if (unlink(PID_FILE) == 0) { - crm_info("[%s] stopped", crm_system_name); - } - - if(crm_ch != NULL) - return 0; - - return 1; -} - - -void -usage(const char* cmd, int exit_status) -{ - FILE* stream; - - stream = exit_status ? stderr : stdout; - - fprintf(stream, "usage: %s [-srkh]" - "[-c configure file]\n", cmd); -/* fprintf(stream, "\t-d\tsets debug level\n"); */ -/* fprintf(stream, "\t-s\tgets daemon status\n"); */ -/* fprintf(stream, "\t-r\trestarts daemon\n"); */ -/* fprintf(stream, "\t-k\tstops daemon\n"); */ -/* fprintf(stream, "\t-h\thelp message\n"); */ - fflush(stream); - - exit(exit_status); -} - -void -pengine_shutdown(int nsig) -{ - static int shuttingdown = 0; - CL_SIGNAL(nsig, pengine_shutdown); - - if (!shuttingdown) { - shuttingdown = 1; - } - if (mainloop != NULL && g_main_is_running(mainloop)) { - g_main_quit(mainloop); - }else{ - exit(LSB_EXIT_OK); - } -} - diff --git a/crm/tengine/tenginemain.c b/crm/tengine/tenginemain.c deleted file mode 100644 index 68f4d200a4..0000000000 --- a/crm/tengine/tenginemain.c +++ /dev/null @@ -1,220 +0,0 @@ -/* $Id: tenginemain.c,v 1.21 2004/08/30 03:17:40 msoffen Exp $ */ -/* - * Copyright (C) 2004 Andrew Beekhof - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This software is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include - -#define SYS_NAME CRM_SYSTEM_TENGINE -#define OPTARGS "skrhV" -#define PID_FILE WORKING_DIR "/" SYS_NAME ".pid" -#define DAEMON_LOG DEVEL_DIR"/"SYS_NAME".log" -#define DAEMON_DEBUG DEVEL_DIR"/"SYS_NAME".debug" - -GMainLoop* mainloop = NULL; -const char* crm_system_name = SYS_NAME; - - -void usage(const char* cmd, int exit_status); -int init_start(void); -void tengine_shutdown(int nsig); - -int -main(int argc, char ** argv) -{ - int req_restart = FALSE; - int req_status = FALSE; - int req_stop = FALSE; - int argerr = 0; - int flag; - - cl_log_set_entity(crm_system_name); - cl_log_set_facility(LOG_USER); - cl_log_set_logfile(DAEMON_LOG); - cl_log_set_debugfile(DAEMON_DEBUG); - CL_SIGNAL(DEBUG_INC, alter_debug); - CL_SIGNAL(DEBUG_DEC, alter_debug); - - while ((flag = getopt(argc, argv, OPTARGS)) != EOF) { - switch(flag) { - case 'V': - alter_debug(DEBUG_INC); - break; - case 's': /* Status */ - req_status = TRUE; - break; - case 'k': /* Stop (kill) */ - req_stop = TRUE; - break; - case 'r': /* Restart */ - req_restart = TRUE; - break; - case 'h': /* Help message */ - usage(crm_system_name, LSB_EXIT_OK); - break; - default: - ++argerr; - break; - } - } - - if (optind > argc) { - ++argerr; - } - - if (argerr) { - usage(crm_system_name,LSB_EXIT_GENERIC); - } - - /* read local config file */ - - if (req_status){ - return init_status(PID_FILE, crm_system_name); - } - - if (req_stop){ - return init_stop(PID_FILE); - } - - if (req_restart) { - init_stop(PID_FILE); - } - - return init_start(); - -} - - -int -init_start(void) -{ - long pid; - ll_cluster_t* hb_fd = NULL; - int facility; -#ifdef REALTIME_SUPPORT - static int crm_realtime = 1; -#endif - - if ((pid = get_running_pid(PID_FILE, NULL)) > 0) { - crm_crit("already running: [pid %ld].", pid); - exit(LSB_EXIT_OK); - } - - /* change the logging facility to the one used by heartbeat daemon */ - hb_fd = ll_cluster_new("heartbeat"); - - crm_info("Switching to Heartbeat logger"); - if ((facility = hb_fd->llc_ops->get_logfacility(hb_fd))>0) { - cl_log_set_facility(facility); - } - - crm_info("Register PID"); - register_pid(PID_FILE, FALSE, tengine_shutdown); - - crm_ch = init_client_ipc_comms(CRM_SYSTEM_CRMD, - subsystem_input_dispatch, - (void*)process_te_message); - - if(crm_ch != NULL) { - send_hello_message(crm_ch, "1234", CRM_SYSTEM_TENGINE, "0", "1"); - - /* Create the mainloop and run it... */ - mainloop = g_main_new(FALSE); - crm_info("Starting %s", crm_system_name); - - -#ifdef REALTIME_SUPPORT - if (crm_realtime == 1){ - cl_enable_realtime(); - }else if (crm_realtime == 0){ - cl_disable_realtime(); - } - cl_make_realtime(SCHED_RR, 5, 64, 64); -#endif - - g_main_run(mainloop); - - } else { - crm_err("Could not connect to the CRMd"); - } - - return_to_orig_privs(); - - if (unlink(PID_FILE) == 0) { - crm_info("[%s] stopped", crm_system_name); - } - - if(crm_ch != NULL) - return 0; - - return 1; -} - - -void -usage(const char* cmd, int exit_status) -{ - FILE* stream; - - stream = exit_status ? stderr : stdout; - - fprintf(stream, "usage: %s [-srkh]" - "[-c configure file]\n", cmd); -/* fprintf(stream, "\t-d\tsets debug level\n"); */ -/* fprintf(stream, "\t-s\tgets daemon status\n"); */ -/* fprintf(stream, "\t-r\trestarts daemon\n"); */ -/* fprintf(stream, "\t-k\tstops daemon\n"); */ -/* fprintf(stream, "\t-h\thelp message\n"); */ - fflush(stream); - - exit(exit_status); -} - -void -tengine_shutdown(int nsig) -{ - static int shuttingdown = 0; - CL_SIGNAL(nsig, tengine_shutdown); - - if (!shuttingdown) { - shuttingdown = 1; - } - if (mainloop != NULL && g_main_is_running(mainloop)) { - g_main_quit(mainloop); - }else{ - exit(LSB_EXIT_OK); - } -}