Bug#858837: lsb-base: pidofproc should limit itself to processes in host system if running on an LXC host
Package: lsb-base
Version: 4.1+Debian13+nmu1
Severity: normal
Dear Maintainer,
Hi,
I am running clamd (part of clamav-daemon) in both an LXC host system and
a couple of containers. The init script was logging the following errors
in the host system:
Mar 26 21:13:02 colo20 clamav-daemon[6507]: Stopping ClamAV daemon: clamd/etc/init.d/clamav-daemon: 268: kill: Illegal number: 5311 4783 4774
It seems that "pidofproc" eventually calls down to "pidof" which returns
output like this:
# pidof clamd
22875 5311 4783 4774
I suggest supplying the "-c" flag to "pidof", either hard-coded or making
pidofproc take a "-c" option and modifying init scripts. Here's
the output when the "-c" flag is used:
# pidof -c clamd
22875
which is correct.
-- System Information:
Debian Release: 8.7
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/16 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
-- no debconf information
Reply to: