Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 195518

Summary: sya-apps/baselayout-1.12.9-r2: start-stop-daemon fails after upgrade to daemon
Product: Gentoo Linux Reporter: Daniel Barkalow <barkalow>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WORKSFORME    
Severity: normal CC: help
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Daniel Barkalow 2007-10-11 17:14:41 UTC
start-stop-daemon fails if (1) the daemon executable has been replaced since it was started and (2) the replacement executable is running, normally due to a fork/exec by the running daemon.

For example, if you emerge a new sshd, connect to the machine entirely independantly (leaving the old connection connected), and try to restart sshd, it fails with the sole message [!!]. If you then close the new connection, and restart sshd in the old connection, it works.

This is because pidof will return the pids of the new tasks, but not the old tasks, if there are new tasks, and then start-stop-daemon doesn't find the pid in the pidfile in the list of pids.

(I'm not clear as to whether this is a flaw in pidof from sys-apps/sysvinit-2.86-r8 or a bug in how start-stop-daemon calls it; the man page for pidof isn't sufficiently specific to tell for sure if this is intended or not, although it seems intentional on pidof's part.)

Reproducible: Always

Steps to Reproduce:
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-10-11 17:31:33 UTC
We already have this fixed in baselayout-2