If cron's job-running child fails to exec /usr/sbin/sendmail and the cron job writes to stdout, hijinks ensue (thanks for the phrase, regis!) The cron job writes on a pipe to a cron process, which copies it to another pipe to what should be a sendmail. If this exits early and the pipe is closed, the cron child process gets killed with a SIGPIPE. Since cron delays running sendmail and doing any of this until it's received something from the cron job, the cron job executes before any of this happens. If the cron job writes again on *its* pipe, it gets a SIGPIPE too, and may fail mysteriously. There's code in cron to log mail failures, but the SIGPIPE prevents that code from running. Fix: Patch to fix this problem by ignoring SIGPIPE, add logging of failure to exec /usr/sbin/sendmail, and minor cleanup of logging functions to get *that* to work. How-To-Repeat: rm /usr/sbin/sendmail echo '* * * * * tee /tmp/termcap < /etc/termcap' | crontab - tail -f /var/log/cron ls -l /etc/termcap /tmp/termcap
The last vfork() remaining in do_command.c should be replaced with fork(), too. The child is doing way too much for vfork to be appropriate any more. --jh
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped
Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>