comparison src/masqmail.c @ 208:3708b655a371

added newlines to the end of log and debug messages where missing
author meillo@marmaro.de
date Sun, 18 Jul 2010 21:49:15 +0200
parents 4fd237550525
children 3c40f86d50e4
comparison
equal deleted inserted replaced
207:dcb315792513 208:3708b655a371
151 /* reparent to init only if init is not already the parent */ 151 /* reparent to init only if init is not already the parent */
152 if (getppid() != 1) { 152 if (getppid() != 1) {
153 if ((pid = fork()) > 0) { 153 if ((pid = fork()) > 0) {
154 exit(EXIT_SUCCESS); 154 exit(EXIT_SUCCESS);
155 } else if (pid < 0) { 155 } else if (pid < 0) {
156 logwrite(LOG_ALERT, "could not fork!"); 156 logwrite(LOG_ALERT, "could not fork!\n");
157 exit(EXIT_FAILURE); 157 exit(EXIT_FAILURE);
158 } 158 }
159 } 159 }
160 160
161 signal(SIGTERM, sigterm_handler); 161 signal(SIGTERM, sigterm_handler);
171 fclose(stdin); 171 fclose(stdin);
172 fclose(stdout); 172 fclose(stdout);
173 fclose(stderr); 173 fclose(stderr);
174 logopen(); 174 logopen();
175 175
176 logwrite(LOG_NOTICE, "%s %s daemon starting", PACKAGE, VERSION); 176 logwrite(LOG_NOTICE, "%s %s daemon starting\n", PACKAGE, VERSION);
177 listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv); 177 listen_port(do_listen ? conf.listen_addresses : NULL, queue_interval, argv);
178 } 178 }
179 179
180 static void 180 static void
181 mode_smtp() 181 mode_smtp()
254 if (deliver(msg)) { 254 if (deliver(msg)) {
255 exit(EXIT_SUCCESS); 255 exit(EXIT_SUCCESS);
256 } else 256 } else
257 exit(EXIT_FAILURE); 257 exit(EXIT_FAILURE);
258 } else if (pid < 0) { 258 } else if (pid < 0) {
259 logwrite(LOG_ALERT, "could not fork for delivery, id = %s", msg->uid); 259 logwrite(LOG_ALERT, "could not fork for delivery, id = %s\n", msg->uid);
260 } 260 }
261 } 261 }
262 } else { 262 } else {
263 fprintf(stderr, "Could not write spool file\n"); 263 fprintf(stderr, "Could not write spool file\n");
264 exit(EXIT_FAILURE); 264 exit(EXIT_FAILURE);