From: James Carlson Date: Mon, 23 Aug 2010 14:01:48 +0000 (-0400) Subject: Nit: use _exit when exec fails and restrict values to 0-255 per POSIX. X-Git-Tag: ppp-2.4.7~50 X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=2b4ea140432eeba5a007c0d4e6236bd0e0c12ba4 Nit: use _exit when exec fails and restrict values to 0-255 per POSIX. --- diff --git a/pppd/main.c b/pppd/main.c index 1b513ca..6e7378b 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -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); }