Bug 170800 - Add a command line switch to disable the crond daemon from forking.
Add a command line switch to disable the crond daemon from forking.
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vixie-cron (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Brock Organ
: FutureFeature
Depends On: 107863
Blocks: 161600
  Show dependency treegraph
Reported: 2005-10-14 12:03 EDT by Jason Vas Dias
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2005:0117
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-05-01 13:54:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jason Vas Dias 2005-10-14 12:03:19 EDT
+++ 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
included here:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. N/A

Actual Results:  NA

Expected Results:  NA

Additional info:


-- Additional comment from petersen@redhat.com 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 caspian@dotconf.net 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 :)

Brandon Zehm

-- Additional comment from petersen@redhat.com 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 jvdias@redhat.com on 2004-08-04 19:12 EST --
Now fixed in vixie-cron-4.1-+ (latest version vixie-cron-4.1-7).
Comment 1 Jason Vas Dias 2005-10-14 12:04:18 EDT
This bug is fixed with vixie-cron-4.1-8_EL3, available from:
and should be considered for inclusion in RHEL-3-U7 .
Comment 5 Jason Vas Dias 2006-05-01 13:54:50 EDT
Fixed with vixie-cron-4.1-10.EL3, currently in RHEL-3-U7 with errata

Note You need to log in before you can comment on or make changes to this bug.