Lines 281-286
Link Here
|
281 |
err(1, "Could not connect socket"); |
281 |
err(1, "Could not connect socket"); |
282 |
} |
282 |
} |
283 |
|
283 |
|
|
|
284 |
/* Print used tty on stdout for wrappers to pick up */ |
285 |
fprintf(stdout, "%s\n", tty); |
286 |
|
284 |
/* Became daemon if required */ |
287 |
/* Became daemon if required */ |
285 |
if (background && daemon(0, 0) < 0) |
288 |
if (background && daemon(0, 0) < 0) |
286 |
err(1, "Could not daemon()"); |
289 |
err(1, "Could not daemon()"); |
Lines 288-297
Link Here
|
288 |
openlog(SPPD_IDENT, LOG_NDELAY|LOG_PERROR|LOG_PID, LOG_DAEMON); |
291 |
openlog(SPPD_IDENT, LOG_NDELAY|LOG_PERROR|LOG_PID, LOG_DAEMON); |
289 |
syslog(LOG_INFO, "Starting on %s...", (tty != NULL)? tty : "stdin/stdout"); |
292 |
syslog(LOG_INFO, "Starting on %s...", (tty != NULL)? tty : "stdin/stdout"); |
290 |
|
293 |
|
291 |
/* Print used tty on stdout for wrappers to pick up */ |
|
|
292 |
if (!background) |
293 |
fprintf(stdout, "%s\n", tty); |
294 |
|
295 |
for (done = 0; !done; ) { |
294 |
for (done = 0; !done; ) { |
296 |
FD_ZERO(&rfd); |
295 |
FD_ZERO(&rfd); |
297 |
FD_SET(amaster, &rfd); |
296 |
FD_SET(amaster, &rfd); |