From 2b4ea140432eeba5a007c0d4e6236bd0e0c12ba4 Mon Sep 17 00:00:00 2001 From: James Carlson Date: Mon, 23 Aug 2010 10:01:48 -0400 Subject: [PATCH] Nit: use _exit when exec fails and restrict values to 0-255 per POSIX. --- pppd/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.2