summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pppd
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>1996-10-22 21:41:43 +0000
committerscrappy <scrappy@FreeBSD.org>1996-10-22 21:41:43 +0000
commit5371bc9b5c27652dfdba2f222e76d2eb54c2fe68 (patch)
tree5e622d4b98e843a12ecc013cbd5789aaa1d3f7f4 /usr.sbin/pppd
parenta41a8c4c57f98c3116f5256fd125e1b87f4de4be (diff)
downloadFreeBSD-src-5371bc9b5c27652dfdba2f222e76d2eb54c2fe68.zip
FreeBSD-src-5371bc9b5c27652dfdba2f222e76d2eb54c2fe68.tar.gz
Fixes:
>Description: pppd failes to set control terminal if -detach option is given. Submitted by: enami@ba2.so-net.or.jp
Diffstat (limited to 'usr.sbin/pppd')
-rw-r--r--usr.sbin/pppd/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/pppd/main.c b/usr.sbin/pppd/main.c
index 8c795a8..c60e916 100644
--- a/usr.sbin/pppd/main.c
+++ b/usr.sbin/pppd/main.c
@@ -18,7 +18,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: main.c,v 1.5 1995/10/31 21:21:26 peter Exp $";
+static char rcsid[] = "$Id: main.c,v 1.6 1996/08/11 17:29:33 pst Exp $";
#endif
#include <stdio.h>
@@ -330,7 +330,7 @@ main(argc, argv)
hungup = 0;
kill_link = 0;
- if (!default_device)
+ if (!default_device && !nodetach)
setsid();
/* run connection script */
@@ -369,7 +369,7 @@ main(argc, argv)
set_up_tty(fd, 0);
/* attach to the controlling tty for signals */
- if (!default_device && ioctl(fd, TIOCSCTTY) < 0) {
+ if (!default_device && !nodetach && ioctl(fd, TIOCSCTTY) < 0) {
syslog(LOG_ERR, "ioctl(TIOCSCTTY) : %m");
die(1);
}
OpenPOWER on IntegriCloud