socket_wait = time(0) + SOCKET_SELECT_TIME;
do {
if(!socket_loop(SOCKET_SELECT_TIME)) {
- putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down.");
+ putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down.\n");
cleanup();
exit(0);
}
atexit(exit_daemon);
FILE *pidfile = fopen(PID_FILE, "w");
if (pidfile == NULL) {
- fprintf(stderr, "Unable to create PID file: %s", strerror(errno));
- putlog(LOGLEVEL_ERROR, "Unable to create PID file: %s", strerror(errno));
+ fprintf(stderr, "Unable to create PID file: %s\n", strerror(errno));
+ putlog(LOGLEVEL_ERROR, "Unable to create PID file: %s\n", strerror(errno));
} else {
fprintf(pidfile, "%i\n", (int)getpid());
fclose(pidfile);
socket_wait = time(0) + SOCKET_SELECT_TIME;
do {
if(!socket_loop(SOCKET_SELECT_TIME)) {
- putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down.");
+ putlog(LOGLEVEL_ERROR, "No more active Bots... shutting down.\n");
cleanup();
exit(0);
}