Bug 53078 - crond keeps filedescriptors open
Summary: crond keeps filedescriptors open
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-09-03 11:11 UTC by Jarno Huuskonen
Modified: 2007-04-18 16:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-30 22:59:54 UTC
Embargoed:


Attachments (Terms of Use)

Description Jarno Huuskonen 2001-09-03 11:11:21 UTC
crond keeps filedescriptors even when it forks to background:
root       541     1  0 08:15 ?        00:00:00 crond
ls -la /proc/541/fd
lrwx------    1 root     root           64 Sep  3 14:12 0 -> /dev/console
l-wx------    1 root     root           64 Sep  3 14:12 1 -> pipe:[643]
l-wx------    1 root     root           64 Sep  3 14:12 2 -> pipe:[644]
l-wx------    1 root     root           64 Sep  3 14:12 21 -> /dev/null
lrwx------    1 root     root           64 Sep  3 14:12 3 ->
/var/run/crond.pid
l-wx------    1 root     root           64 Sep  3 14:12 4 -> /var/log/cron
lr-x------    1 root     root           64 Sep  3 14:12 7 -> pipe:[645]
l-wx------    1 root     root           64 Sep  3 14:12 8 -> pipe:[645]

Because crond keeps fd to /dev/console (or with ssh connection /dev/pts/x)
restarting crond leaves stuck sshd connection.

I think that vixie-cron from Openwall has this problem fixed:
http://www.openwall.com/Owl ...

Comment 1 Need Real Name 2003-04-22 19:01:42 UTC
This bug is still seen in rh72, rh73, rh8 and rh9.

Comment 2 Jens Petersen 2003-04-23 01:13:23 UTC
Reproduced.

Comment 3 Need Real Name 2003-04-23 01:17:09 UTC
Updating the init script to call crond like so:

daemon crond < /dev/null

appears to workaround the problem.  Not sure yet if it causes any other problems.

You can also call "/sbin/service crond restart < /dev/null" through an ssh and
crond will happily restart and your ssh session will close.  Again, not sure if
that's good or bad.

Comment 4 Jens Petersen 2004-06-30 17:54:30 UTC
This should be fixed in vixie-cron-3.0.1-94 in rawhide shortly.

Comment 5 Jason Vas Dias 2004-08-30 22:59:54 UTC
Just clearing out old bugs here. This was fixed in vixie-cron-3.0.1-94.
Latest version: vixie-cron-4.1-10


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