Bug 72217 - ssh sessions hang after running "service"
ssh sessions hang after running "service"
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-08-21 20:03 EDT by Pete Zaitcev
Modified: 2014-03-16 22:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-29 16:15:46 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 Pete Zaitcev 2002-08-21 20:03:56 EDT
Description of Problem:

Certain daemons forget to close their descriptors.
The initlog (process.c) closes stderr and stdout but
forgets stdin. Thus, login sessions fail to exist if
/sbin/service was executed.

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


How Reproducible:


Steps to Reproduce:
1. Log into a remote server, not running NFS by default.
2. Type "service nfs start"
3. Try to log out

Actual Results:

Login session hangs due to attached stdin in a daemon.

Expected Results:

Login sessions ending normally.

Additional Information:
The code around process.c:runCommand() is not maintainable.
Comment 1 Pete Zaitcev 2002-08-21 20:14:25 EDT
This can be worked around with a simple patch to the script,
but it seems proper to fix the problem in initlog, in order
to avoid surprises in the future.

--- ./etc/rc.d/init.d/functions.0	Wed Feb  6 20:05:59 2002
+++ ./etc/rc.d/init.d/functions	Wed Aug 21 17:09:07 2002
@@ -136,9 +136,9 @@
 	# And start it up.
 	if [ -z "$user" ]; then
   $nice initlog $INITLOG_ARGS -c "$*"
   $nice initlog $INITLOG_ARGS -c "$*" </dev/null
   $nice initlog $INITLOG_ARGS -c "su -s /bin/bash - $user -c \"$*\""
   $nice initlog $INITLOG_ARGS -c "su -s /bin/bash - $user -c \"$*\"" </dev/null
 	[ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup"
Comment 2 Bill Nottingham 2005-09-29 16:15:46 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
Realistically, daemons should be fixed.

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