From: Guus Sliepen Date: Sat, 27 Apr 2002 11:40:45 +0000 (+0000) Subject: Informative log message if execl() failed. X-Git-Tag: release-1.0pre8~77 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=67a6d7bcc4891c627663c639c0e02315bd4cf437;p=oweals%2Ftinc.git Informative log message if execl() failed. --- diff --git a/src/process.c b/src/process.c index bdd81e3..ae1985d 100644 --- a/src/process.c +++ b/src/process.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: process.c,v 1.1.2.39 2002/03/26 12:00:38 guus Exp $ + $Id: process.c,v 1.1.2.40 2002/04/27 11:40:45 guus Exp $ */ #include "config.h" @@ -244,11 +244,10 @@ cp execl(scriptname, NULL); /* No return on success */ - - if(errno != ENOENT) /* Ignore if the file does not exist */ - exit(1); /* Some error while trying execl(). */ - else - exit(0); + + openlog("tinc", LOG_CONS | LOG_PID, LOG_DAEMON); + syslog(LOG_ERR, _("Could not execute `%s': %s"), scriptname, strerror(errno)); + exit(errno); } /*