]> granicus.if.org Git - cronie/commitdiff
rhbz#247228 cron jobs fail semi-randomly if sendmail (or other mail)
authormmaslano <mmaslano@redhat.com>
Fri, 24 Aug 2007 11:41:29 +0000 (13:41 +0200)
committerTomas Janousek <tomi@nomi.cz>
Mon, 27 Aug 2007 14:03:55 +0000 (16:03 +0200)
isn't set. The jobs aren't "sometimes" run, because output, which
has to be sent isn't set and the stdin pipe, which is used haven't
enough capacity.
The problem is at least reported in log.

src/popen.c

index 9247f341adc14488199ee08b753c90989dcaa9ce..9989dc981b025252c45199a195316dbfd8909a69 100644 (file)
@@ -106,7 +106,8 @@ cron_popen(char *program, const char *type, struct passwd *pw)
                        }
                        (void)close(pdes[1]);
                }
-               execvp(argv[0], argv);
+               if (execvp(argv[0], argv) < 0)
+                   log_it("CRON", getpid(), "Mail wan't set up, some jobs could failed", strerror(errno));
                _exit(1);
        }
        /* parent; assume fdopen can't fail...  */