提交 6bad7635 authored 作者: Michael Jerris's avatar Michael Jerris

cleanup pid file on orderly exit.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6559 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 70a19cee
...@@ -214,6 +214,7 @@ int main(int argc, char *argv[]) ...@@ -214,6 +214,7 @@ int main(int argc, char *argv[])
int known_opt; int known_opt;
int high_prio = 0; int high_prio = 0;
switch_core_flag_t flags = SCF_USE_SQL; switch_core_flag_t flags = SCF_USE_SQL;
int status;
#ifdef WIN32 #ifdef WIN32
SERVICE_TABLE_ENTRY dispatchTable[] = { SERVICE_TABLE_ENTRY dispatchTable[] = {
...@@ -428,11 +429,16 @@ int main(int argc, char *argv[]) ...@@ -428,11 +429,16 @@ int main(int argc, char *argv[])
} }
fprintf(f, "%d", pid = getpid()); fprintf(f, "%d", pid = getpid());
fclose(f); fflush(f);
switch_core_runtime_loop(nc); switch_core_runtime_loop(nc);
return switch_core_destroy(); status = switch_core_destroy();
fclose(f);
unlink(pid_path);
return status;
} }
/* For Emacs: /* For Emacs:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论