Informative log message if execl() failed.

This commit is contained in:
Guus Sliepen 2002-04-27 11:40:45 +00:00
parent e6a67fc439
commit 67a6d7bcc4

View file

@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 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" #include "config.h"
@ -245,10 +245,9 @@ cp
execl(scriptname, NULL); execl(scriptname, NULL);
/* No return on success */ /* No return on success */
if(errno != ENOENT) /* Ignore if the file does not exist */ openlog("tinc", LOG_CONS | LOG_PID, LOG_DAEMON);
exit(1); /* Some error while trying execl(). */ syslog(LOG_ERR, _("Could not execute `%s': %s"), scriptname, strerror(errno));
else exit(errno);
exit(0);
} }
/* /*