Bug 72217 - ssh sessions hang after running "service"
Summary: ssh sessions hang after running "service"
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
(Show other bugs)
Version: 7.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-08-22 00:03 UTC by Pete Zaitcev
Modified: 2014-03-17 02:30 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 20:15:46 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Pete Zaitcev 2002-08-22 00:03:56 UTC
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):

initscripts-6.43-1

How Reproducible:

100%

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-22 00:14:25 UTC
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
 	else
-
   $nice initlog $INITLOG_ARGS -c "su -s /bin/bash - $user -c \"$*\""
+
   $nice initlog $INITLOG_ARGS -c "su -s /bin/bash - $user -c \"$*\"" </dev/null
 	fi
 	[ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup"
 }


Comment 2 Bill Nottingham 2005-09-29 20:15:46 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.
Realistically, daemons should be fixed.


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