SVN: rc-scripts/trunk/rc.d/init.d/functions
    glen 
    glen at pld-linux.org
       
    Mon Feb  8 18:11:42 CET 2010
    
    
  
Author: glen
Date: Mon Feb  8 18:11:41 2010
New Revision: 11136
Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- skip dead pids in status() with --pidfile, or is filter_chroot() broken by design?
Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions	(original)
+++ rc-scripts/trunk/rc.d/init.d/functions	Mon Feb  8 18:11:41 2010
@@ -833,6 +833,10 @@
 	# if pidfile specified, pid must be there
 	if [ "$pidfile" ]; then
 		[ -f "$pidfile" ] && read pid < $pidfile
+		# filter_chroot does not filter out dead pids, so this extra check, see t/status-pidfile.sh
+		if [ ! -d "/proc/$pid" ]; then
+			pid=
+		fi
 	else
 		pid=$(pidof -o $$ -o $PPID -o %PPID -x $daemon)
 	fi
    
    
More information about the pld-cvs-commit
mailing list