The fix in #634634 excludes PIDs of processes running in a different namespace regardless of whether the PID has been explicitly stored in a PID file mentioned through the --pidfile parameter or not. I believe the correct behavior should be to only exclude the PIDs if they were generated by interpretation, but not if they are mentioned in a PID file. Reproducible: Always Steps to Reproduce: 1. Run a service in a namespaced chroot. I've always used jchroot for this. 2. Store its PID in /run/service-name.pid. The PID should be the actual service, and not the parent chroot-er process. This makes the service the explicit receiver of the TERM signal and would be able to shutdown properly. No need to think about signal propagation. 3. Run 'start-stop-daemon --stop --quiet --pidfile /run/service-name.pid'.
Created attachment 691629 [details, diff] Fix to not exclude specified PID
Turns out the fix is just simple. Please see patch.
This is fixed in the following commit: https://github.com/OpenRC/openrc/commit/ef76a663bcc03d4cc9dd1ef05c800f208e26d0ed This will be in OpenRC 0.43. Thanks, William