X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fmain.c;h=7de1d1374832dfb72915d3d0ea023fd70d7da5d6;hp=4e1e3de522e4ea4dda2dabd9a600e826b4cc4ffa;hb=8972198dbc3630137fc364c36f61d65abc36b21a;hpb=9ec074e3ff0ef6bbdd673bfd199713269748f08d;ds=sidebyside diff --git a/pppd/main.c b/pppd/main.c index 4e1e3de..7de1d13 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: main.c,v 1.2 1993/11/23 23:40:53 paulus Exp $"; +static char rcsid[] = "$Id: main.c,v 1.4 1993/12/15 00:17:43 paulus Exp $"; #endif #define SETSID @@ -223,6 +223,11 @@ main(argc, argv) pid = getpid(); + if (!ppp_available()) { + fprintf(stderr, "Sorry - PPP is not available on this system\n"); + exit(1); + } + /* * Initialize to the standard option set, then parse, in order, * the system options file, the user's options file, and the command @@ -259,8 +264,6 @@ main(argc, argv) syslog(LOG_ERR, "getpgrp(0): %m"); die(1); } - if (pgrpid != pid) - syslog(LOG_WARNING, "warning... not a process group leader"); } else { /* @@ -394,14 +397,14 @@ main(argc, argv) } /* - * Set process group of device to our process group so we can get SIGIOs. + * Set process group of device to our process group so we can get + * SIGIOs and SIGHUPs. */ #ifdef SETSID if (default_device) { int id = tcgetpgrp(fd); if (id != pgrpid) { - syslog(LOG_WARNING, - "warning: not foreground process group leader"); + syslog(LOG_WARNING, "warning: not in tty's process group"); } } else { if (tcsetpgrp(fd, pgrpid) < 0) {