Nit: use _exit when exec fails and restrict values to 0-255 per POSIX.
authorJames Carlson <carlsonj@workingcode.com>
Mon, 23 Aug 2010 14:01:48 +0000 (10:01 -0400)
committerJames Carlson <carlsonj@workingcode.com>
Mon, 23 Aug 2010 14:01:48 +0000 (10:01 -0400)
pppd/main.c

index 1b513ca3030e1d621625ea6fedf8deb8a4ba0b2a..6e7378be8d7e21ec0d7ed23e17630ec27b6d5e22 100644 (file)
@@ -1719,7 +1719,7 @@ device_script(program, in, out, dont_wait)
     update_system_environment();
     execl("/bin/sh", "sh", "-c", program, (char *)0);
     perror("pppd: could not exec /bin/sh");
-    exit(99);
+    _exit(99);
     /* NOTREACHED */
 }
 
@@ -1841,7 +1841,7 @@ run_program(prog, args, must_exist, done, arg, wait)
        syslog(LOG_ERR, "Can't execute %s: %m", prog);
        closelog();
     }
-    _exit(-1);
+    _exit(99);
 }