fix prototype of signal handler functions (sun studio doesn't like these wrong)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2949 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-10-02 16:48:00 +00:00
parent 6797158b61
commit af06084f43
2 changed files with 13 additions and 13 deletions

View File

@ -51,12 +51,12 @@ static char *pfile = PIDFILE;
static HANDLE shutdown_event; static HANDLE shutdown_event;
#endif #endif
static int handle_SIGHUP(int sig) static void handle_SIGHUP(int sig)
{ {
uint32_t arg = 0; uint32_t arg = 0;
if(sig); if(sig);
switch_core_session_ctl(SCSC_SHUTDOWN, &arg); switch_core_session_ctl(SCSC_SHUTDOWN, &arg);
return 0; return;
} }
@ -228,8 +228,8 @@ int main(int argc, char *argv[])
if (bg) { if (bg) {
ppath = lfile; ppath = lfile;
signal(SIGHUP, (void *) handle_SIGHUP); signal(SIGHUP, handle_SIGHUP);
signal(SIGTERM, (void *) handle_SIGHUP); signal(SIGTERM, handle_SIGHUP);
#ifdef WIN32 #ifdef WIN32
FreeConsole(); FreeConsole();

View File

@ -3677,26 +3677,26 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
#ifdef SIGPIPE #ifdef SIGPIPE
static int handle_SIGPIPE(int sig) static void handle_SIGPIPE(int sig)
{ {
if(sig); if(sig);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig Pipe!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig Pipe!\n");
return 0; return;
} }
#endif #endif
#ifdef TRAP_BUS #ifdef TRAP_BUS
static int handle_SIGBUS(int sig) static void handle_SIGBUS(int sig)
{ {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig BUS!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig BUS!\n");
return 0; return;
} }
#endif #endif
/* no ctl-c mofo */ /* no ctl-c mofo */
static int handle_SIGINT(int sig) static void handle_SIGINT(int sig)
{ {
if (sig); if (sig);
return 0; return;
} }
SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, const char **err) SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, const char **err)
{ {
@ -3706,12 +3706,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, cons
} }
/* set signal handlers */ /* set signal handlers */
signal(SIGINT, (void *) handle_SIGINT); signal(SIGINT, handle_SIGINT);
#ifdef SIGPIPE #ifdef SIGPIPE
signal(SIGPIPE, (void *) handle_SIGPIPE); signal(SIGPIPE, handle_SIGPIPE);
#endif #endif
#ifdef TRAP_BUS #ifdef TRAP_BUS
signal(SIGBUS, (void *) handle_SIGBUS); signal(SIGBUS, handle_SIGBUS);
#endif #endif
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Bringing up environment.\n");