Author: anthm Date: Tue Jul 15 11:51:10 2008 New Revision: 9036 Modified: freeswitch/trunk/src/switch_console.c Log: fix FSCORE-150 Modified: freeswitch/trunk/src/switch_console.c ============================================================================== --- freeswitch/trunk/src/switch_console.c (original) +++ freeswitch/trunk/src/switch_console.c Tue Jul 15 11:51:10 2008 @@ -407,8 +407,13 @@ switch_memory_pool_t *pool = (switch_memory_pool_t *) obj; while (running) { - int32_t arg; + int32_t arg = 0; + if (getppid() == 1) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "We've become an orphan, no more console for us.\n"); + break; + } + switch_core_session_ctl(SCSC_CHECK_RUNNING, &arg); if (!arg) { break; @@ -437,6 +442,7 @@ } switch_core_destroy_memory_pool(&pool); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Editline thread exiting\n"); return NULL; } @@ -681,7 +687,6 @@ } - SWITCH_DECLARE(void) switch_console_loop(void) { switch_thread_t *thread;
participants (1)
-
Freeswitch SVN