View | Details | Raw Unified | Return to bug 195126 | Differences between
and this patch

Collapse All | Expand All

(-)usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c (-4 / +4 lines)
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
	fflush(stdout);
287
284
	/* Became daemon if required */
288
	/* Became daemon if required */
285
	if (background && daemon(0, 0) < 0)
289
	if (background && daemon(0, 0) < 0)
286
		err(1, "Could not daemon()");
290
		err(1, "Could not daemon()");
Lines 288-297 Link Here
288
	openlog(SPPD_IDENT, LOG_NDELAY|LOG_PERROR|LOG_PID, LOG_DAEMON);
292
	openlog(SPPD_IDENT, LOG_NDELAY|LOG_PERROR|LOG_PID, LOG_DAEMON);
289
	syslog(LOG_INFO, "Starting on %s...", (tty != NULL)? tty : "stdin/stdout");
293
	syslog(LOG_INFO, "Starting on %s...", (tty != NULL)? tty : "stdin/stdout");
290
294
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; ) {
295
	for (done = 0; !done; ) {
296
		FD_ZERO(&rfd);
296
		FD_ZERO(&rfd);
297
		FD_SET(amaster, &rfd);
297
		FD_SET(amaster, &rfd);

Return to bug 195126