version 1.2.2.1, 2012/04/11 15:08:27
|
version 1.2.2.4, 2012/04/15 21:52:12
|
Line 43 sigHand(int sig)
|
Line 43 sigHand(int sig)
|
break; |
break; |
} |
} |
|
|
syslog(LOG_ERR, "Error:: can't reload #%d - %s", cfg_GetErrno(), cfg_GetError()); | ioLIBERR(cfg); |
case SIGTERM: |
case SIGTERM: |
ioDEBUG(1, "Terminate MQTT service in progress"); |
ioDEBUG(1, "Terminate MQTT service in progress"); |
Kill++; |
Kill++; |
Line 155 main(int argc, char **argv)
|
Line 155 main(int argc, char **argv)
|
goto end; |
goto end; |
} |
} |
else |
else |
ioVERBOSE(1) printf("Start service in batch mode ...\n"); | ioDEBUG(1, "Start service in batch mode ..."); |
|
|
memset(&sa, 0, sizeof sa); |
memset(&sa, 0, sizeof sa); |
sigemptyset(&sa.sa_mask); |
sigemptyset(&sa.sa_mask); |
Line 164 main(int argc, char **argv)
|
Line 164 main(int argc, char **argv)
|
sigaction(SIGTERM, &sa, NULL); |
sigaction(SIGTERM, &sa, NULL); |
sigaction(SIGCHLD, &sa, NULL); |
sigaction(SIGCHLD, &sa, NULL); |
sigaction(SIGPIPE, &sa, NULL); |
sigaction(SIGPIPE, &sa, NULL); |
ioDEBUG(2, "Service is ready for start engine ..."); | ioDEBUG(2, "Service is ready for starting engine ..."); |
|
|
if ((sock = srv_Socket(&cfg)) == -1) { |
if ((sock = srv_Socket(&cfg)) == -1) { |
ret = 4; |
ret = 4; |
Line 181 main(int argc, char **argv)
|
Line 181 main(int argc, char **argv)
|
} |
} |
|
|
if (!(root = schedBegin())) { |
if (!(root = schedBegin())) { |
printf("Error:: scheduler #%d - %s\n", sched_GetErrno(), sched_GetError()); | ioLIBERR(sched); |
ret = 6; |
ret = 6; |
goto end; |
goto end; |
} |
} |
|
|
|
/* go catch the cat ... */ |
Run(sock); |
Run(sock); |
|
|
schedEnd(&root); |
schedEnd(&root); |
end: | end: /* free all resources */ |
srv_Close(sock); |
srv_Close(sock); |
call.CloseLOG(logg); |
call.CloseLOG(logg); |
call.ClosePUB(pub); |
call.ClosePUB(pub); |