* `LICENSE' that comes with the fcron source distribution.
*/
- /* $Id: job.c,v 1.52 2002-08-29 17:30:54 thib Exp $ */
+ /* $Id: job.c,v 1.53 2002-09-07 13:07:48 thib Exp $ */
#include "fcron.h"
xcloselog();
+ if ( chdir("/") < 0 )
+ die_e("Could not chdir to /");
+
/* run sendmail with mail file as standard input */
execl(sendmail, sendmail, SENDMAIL_ARGS, line->cl_mailto, NULL);
error_e("Can't find \"%s\". Trying a execlp(\"sendmail\")", sendmail);