Bug 72217

Summary: ssh sessions hang after running "service"
Product: [Retired] Red Hat Linux Reporter: Pete Zaitcev <zaitcev>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED WONTFIX QA Contact: Brock Organ <borgan>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.