Red Hat Bugzilla – Bug 170800
Add a command line switch to disable the crond daemon from forking.
Last modified: 2007-11-30 17:07:08 EST
+++ This bug was initially created as a clone of Bug #107863 +++
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.1; Linux)
Description of problem:
This is a request for a command line switch to disable the crond daemon from
forking into the background on startup. This feature would be very useful when
running crond from init or from DJB's daemontools.
I have patched the current version of vixie-cron that is shipped with Redhat 9.0
and added a -n (no fork) option. It is a very simple (9 line) patch.
That patch is available here:
and I have a modified version of the RH9 vixie-cron source rpm with that patch
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: NA
Expected Results: NA
-- Additional comment from firstname.lastname@example.org on 2003-10-29 20:30 EST --
Probably I'm missing something, but what is this patch trying
to achieve? Why is forking at startup so bad?
-- Additional comment from email@example.com on 2003-10-30 01:48 EST --
No problem, let me try to explain where I'm coming from.
Forking at startup isn't really that bad. In fact most all daemons
should and do. However, many daemons also have a command line option
to disable forking at startup. Good examples of this are sysklogd,
sshd, and ntpd (and many others). This functionality is useful for
running the daemon from inittab, or from DJB's daemon tools, or from a
bash "while true" loop. Running daemons from any of these sort of
"failsafe" configurations usually requires that the daemon not fork at
startup, so that if it does die for some reason the loop can
immediatly restart the daemon.
I manage an enterprise Linux environment for a fortune 50 company, and
have decided to deploy DJB's daemon-tools to keep mission critical
services running. Every daemon that we needed to run via daemon-tools
has a command line switch (or configuration file option) to disable
forking at startup, except vixie-cron. In order to keep all our
daemons running from daemon-tools I added the -n command line option
to it to disable forking. It would be nice if Redhat would
incorporate this non-intrusive patch so that I don't have to patch and
recompile vixie-cron every time I upgrade our servers :)
-- Additional comment from firstname.lastname@example.org on 2004-06-30 12:13 EST --
Ok, cron 4.1 has a -n option to run in the foreground.
It may be a little while though before we're ready to
upgrade to 4.1.
-- Additional comment from email@example.com on 2004-08-04 19:12 EST --
Now fixed in vixie-cron-4.1-+ (latest version vixie-cron-4.1-7).
This bug is fixed with vixie-cron-4.1-8_EL3, available from:
and should be considered for inclusion in RHEL-3-U7 .
Fixed with vixie-cron-4.1-10.EL3, currently in RHEL-3-U7 with errata