rc-scripts/trunk/rc.d/init.d/functions
arekm
cvs at pld-linux.org
Thu Aug 11 18:35:54 CEST 2005
Author: arekm
Date: Thu Aug 11 18:35:48 2005
New Revision: 6292
Modified:
rc-scripts/trunk/rc.d/init.d/functions
Log:
filter_chroot(): Do not filter pids for processes that no longer exists. We don't know whether these were from current (ch)root so we assume that they were.
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 Thu Aug 11 18:35:48 2005
@@ -369,8 +369,9 @@
return 1
}
-# outside chroot get only those processes, which are outside chroot.
-# inside chroot get only those processes, which are inside chroot.
+# - outside chroot get only those processes, which are outside chroot.
+# - inside chroot get only those processes, which are inside chroot.
+# - don't filter out pids which do not have corresponding running processes (process died etc)
# (note: some processes like named are chrooted but run outside chroot)
filter_chroot()
{
@@ -389,6 +390,8 @@
done
fi
[ "$good_add_pid" -eq 1 ] && good_pids="$good_pids $root_pid"
+ elif [ ! -d "/proc/$root_pid" ]; then
+ good_pids="$good_pids $root_pid"
fi
done
echo $good_pids
More information about the pld-cvs-commit
mailing list