Decklin Foster left as an exercise for the reader:
> I'm not sure this is implied by the wording. Regardless, --kill
> functions by reading the pid_file and sending a SIGTERM to the mpd
> process. start-stop-daemon (as called by our init script) sends SIGTERM,
> waits 5 seconds, then sends SIGKILL. If your system is extremely loaded,
> perhaps MPD does not respond to the SIGTERM within 5 seconds. Try
> changing the value given for --retry.
> 
> If this solves a reproducible problem for you, I'll consider increasing
> it. However, if your system seems fine otherwise, it would be helpful if
> you could examine closely what is going on during the timeout. It may
> be a sign of some other problem.

It does solve a reproducible problem for me -- that my playlist / track
position is not preserved across reboots. However, I might have determined
the real cause. I'm using an alternate configuration file (~dank/.mpdconf),
and have set this in /etc/defaults/mpd via:

[recombinator](0) $ cat /etc/default/mpd
## Defaults for the MPD init script, sourced by /etc/init.d/mpd on Debian
## systems.  Uncomment (remove the leading '#') and change values as needed.

## Change this to prevent MPD from being started as a system service (for
## example, if you want to run it from a regular user account)
START_MPD=true

## The configuration file location for mpd:
MPDCONF=/home/dank/.mpdconf
[recombinator](0) $

When I shutdown, I see the error message "can't find PID in
/var/run/mpd/pid". This pidfile is the location set by /etc/mpd.conf. That,
however, is not the configuration file which ought be used. Start works
successfully, since the correct pidfile is being set:

[recombinator](0) $ ls /var/run/mpd/
[recombinator](0) $ ls ~dank/var/lib/mpd/
database  pidlock  statefile
[recombinator](0) $ cat ~dank/var/lib/mpd/pidlock
3321
[recombinator](0) $ ps 3321
  PID TTY      STAT   TIME COMMAND
 3321 ?        S      0:00 /usr/local/bin/mpd /home/dank/.mpdconf
[recombinator](0) $

I'm not sure why this happens -- it seems the MPDCONF variable should be
getting set for shutdown, as well. Nonetheless, it suggests the cause of the
problems, and why my initial suggestion was incorrect.

--rigorously, nick

-- 
Nick Black <[EMAIL PROTECTED]>
"NP: The class of dashed hopes and idle dreams."
Principal Engineer, Secure Computing Applied Research

Attachment: signature.asc
Description: Digital signature

Reply via email to