Bug 107863 - 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 Linux
Classification: Retired
Component: vixie-cron (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
Brock Organ
: FutureFeature
Depends On:
Blocks: 170800
  Show dependency treegraph
Reported: 2003-10-23 16:41 EDT by Brandon Zehm
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version: vixie-cron-4.1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-04 19:12:19 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 Brandon Zehm 2003-10-23 16:41:48 EDT
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:

Comment 1 Jens Petersen 2003-10-29 20:30:56 EST
Probably I'm missing something, but what is this patch trying
to achieve?  Why is forking at startup so bad?
Comment 2 Brandon Zehm 2003-10-30 01:48:03 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
Comment 3 Jens Petersen 2004-06-30 12:13:33 EDT
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.
Comment 4 Jason Vas Dias 2004-08-04 19:12:19 EDT
Now fixed in vixie-cron-4.1-+ (latest version vixie-cron-4.1-7).

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