From: thib Date: Sat, 10 Feb 2001 12:53:57 +0000 (+0000) Subject: bug corrected : configure's --without-sendmail wasn't working X-Git-Tag: ver1564~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4b07c14eef4b6685dfff2d8c83fe82540c0c1917;p=fcron bug corrected : configure's --without-sendmail wasn't working --- diff --git a/fileconf.c b/fileconf.c index d7853a6..7dd494d 100644 --- a/fileconf.c +++ b/fileconf.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fileconf.c,v 1.38 2001-02-01 20:49:31 thib Exp $ */ + /* $Id: fileconf.c,v 1.39 2001-02-10 12:53:57 thib Exp $ */ #include "fcrontab.h" @@ -1030,6 +1030,10 @@ read_freq(char *ptr, CF *cf) goto exiterr; } +#ifndef SENDMAIL + clear_mail(cl->cl_option); +#endif + cl->cl_next = cf->cf_line_base; cf->cf_line_base = cl; @@ -1126,6 +1130,10 @@ read_arys(char *ptr, CF *cf) goto exiterr; } +#ifndef SENDMAIL + clear_mail(cl->cl_option); +#endif + cl->cl_next = cf->cf_line_base; cf->cf_line_base = cl; @@ -1254,6 +1262,10 @@ read_period(char *ptr, CF *cf) } ok: +#ifndef SENDMAIL + clear_mail(cl->cl_option); +#endif + cl->cl_next = cf->cf_line_base; cf->cf_line_base = cl; diff --git a/job.c b/job.c index b47e2d4..ad3f162 100644 --- a/job.c +++ b/job.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: job.c,v 1.33 2001-02-01 20:52:06 thib Exp $ */ + /* $Id: job.c,v 1.34 2001-02-10 12:56:12 thib Exp $ */ #include "fcron.h" @@ -307,6 +307,7 @@ void launch_mailer(CL *line, int mailfd) /* mail the output of a job to user */ { +#ifdef SENDMAIL foreground = 0; /* set stdin to the job's output */ @@ -320,7 +321,9 @@ launch_mailer(CL *line, int mailfd) error_e("Can't find \""SENDMAIL"\". Trying a execlp(\"sendmail\")"); execlp("sendmail", "sendmail", SENDMAIL_ARGS, line->cl_mailto, NULL); die_e("Can't exec " SENDMAIL); - +#else /* defined(SENDMAIL) */ + exit(EXIT_OK); +#endif } int