Hi, in start-stop-daemon (OpenRC) 0.12.4 the chroot handling has a litlle bug (can't stop process). Openrc is manually compiled without any options. It checks executable file and pid file in main filesystem not under jail: #/usr/local/openrc.0.12.4/start-stop-daemon --start --background \ --make-pidfile --pidfile /var/run/test.pid --chroot /opt/chroot/ --exec /bin/sleep 1000 then #/usr/local/openrc.0.12.4/start-stop-daemon --stop --chroot /opt/chroot/ \ -v --retry=60 --pidfile /var/run/test.pid * start-stop-daemon: fopen `/var/run/test.pid': No such file or directory file exist in /opt/chroot/var/run/test.pid file dont exist in /var/run/test.pid i found bug report like this in debian but source is diffrent https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=144484
Hi, I'm curious why you are running openrc-0.12.4? Which distro are you using?
(In reply to William Hubbs from comment #1) > Hi, > > I'm curious why you are running openrc-0.12.4? Which distro are you > using? Hi, Now im using openrc-0.19.1 the same problem. Distro Gentoo
start-stop-daemon (OpenRC) 0.20.4 , the same problem. * start-stop-daemon: fopen `/var/run/test.pid': No such file or directory
Hi, now I see what the issue is. The --chroot option only tells s-s-d to chroot into that directory before starting the daemon; it does not add the chroot path to the pidfile path. This means you should use the --chroot switch only when you start the daemon, and the --pidfile path should be specified with the chroot path when stopping it. Change your stop command to the following: #/usr/local/openrc.0.12.4/start-stop-daemon --stop -v --retry=60 \ --pidfile /opt/chroot/var/run/test.pid Let me know if this doesn't work. Thanks much. William