diff options
Diffstat (limited to 'usr.bin/bluetooth')
-rw-r--r-- | usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c b/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c index 314149e..4e0d04b 100644 --- a/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c +++ b/usr.bin/bluetooth/rfcomm_sppd/rfcomm_sppd.c @@ -281,22 +281,8 @@ main(int argc, char *argv[]) } /* Became daemon if required */ - if (background) { - switch (fork()) { - case -1: - err(1, "Could not fork()"); - /* NOT REACHED */ - - case 0: - exit(0); - /* NOT REACHED */ - - default: - if (daemon(0, 0) < 0) - err(1, "Could not daemon()"); - break; - } - } + if (background && daemon(0, 0) < 0) + err(1, "Could not daemon()"); openlog(SPPD_IDENT, LOG_NDELAY|LOG_PERROR|LOG_PID, LOG_DAEMON); syslog(LOG_INFO, "Starting on %s...", (tty != NULL)? tty : "stdin/stdout"); |