提交 c8cf0720 编写于 作者: S Shengliang Guan

minor changes

上级 95457415
......@@ -19,7 +19,20 @@
#include "taoserror.h"
#include "httpSystem.h"
void signal_handler(int signum) {
httpStopSystem();
httpCleanUpSystem();
exit(EXIT_SUCCESS);
}
int main(int argc, char *argv[]) {
struct sigaction act;
act.sa_handler = signal_handler;
sigaction(SIGTERM, &act, NULL);
sigaction(SIGHUP, &act, NULL);
sigaction(SIGINT, &act, NULL);
sigaction(SIGABRT, &act, NULL);
// Initialize the system
if (httpInitSystem() < 0) {
exit(EXIT_FAILURE);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册