Bug 53078 - crond keeps filedescriptors open
crond keeps filedescriptors open
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron (Show other bugs)
9
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jens Petersen
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-09-03 07:11 EDT by Jarno Huuskonen
Modified: 2007-04-18 12:36 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-30 18:59:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jarno Huuskonen 2001-09-03 07:11:21 EDT
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 15:01:42 EDT
This bug is still seen in rh72, rh73, rh8 and rh9.
Comment 2 Jens Petersen 2003-04-22 21:13:23 EDT
Reproduced.
Comment 3 Need Real Name 2003-04-22 21:17:09 EDT
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 13:54:30 EDT
This should be fixed in vixie-cron-3.0.1-94 in rawhide shortly.
Comment 5 Jason Vas Dias 2004-08-30 18:59:54 EDT
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.