[MacPorts] #24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured)
MacPorts
noreply at macports.org
Sat Mar 13 14:58:01 PST 2010
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured)
-----------------------------------+----------------------------------------
Reporter: greg-macports@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.2
Keywords: | Port: mpd
-----------------------------------+----------------------------------------
I've just installed mpd-0.15.8_0 and followed the instructions for getting
launchd to manage it. But stopping the daemon does not work: i.e. running
"sudo launchctl stop org.macports.mpd" has no discernible effect on the
system state. mpd just keeps running.
Here's how things look with mpd running:
{{{
$ ps u -ax | grep mpd
greg 81805 1.3 0.1 75436 396 s006 S+ 5:50PM 0:00.00
grep mpd
root 177 0.0 0.9 88532 6876 s000 S+ 4:30PM 0:36.58
./bin/mpd etc/mpd.conf --no-daemon --stdout
root 46337 0.0 0.1 75424 704 ?? Ss 5:37PM 0:00.01
/opt/local/bin/daemondo --label=mpd --start-cmd
/opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper start ; --stop-
cmd /opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper stop ;
--restart-cmd /opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper
restart ; --pid=none
}}}
(Disclaimer: I am completely new to MacPorts and launchd. So I'm making
educated guesses here.)
From this, I'm guessing that "sudo launchctl stop org.macports.mpd" runs
{{{
/opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper stop
}}}
But if I run that command manually, it fails:
{{{
$ sudo etc/LaunchDaemons/org.macports.mpd/mpd.wrapper stop
daemon: no pid_file specified in the config file
etc/LaunchDaemons/org.macports.mpd/mpd.wrapper: line 23: 92889 Abort trap
/opt/local/bin/mpd --kill
}}}
(Incidentally, it takes a loooong time for mpd to crash, around 21 sec.
Not sure if that is an upstream bug or not.)
From the reading I've done on launchd, I gather that pid files are frowned
upon: you're supposed to launchd take care of it. OK, fine, but doesn't
that mean that mpd.wrapper cannot use "mpd --kill"?
--
Ticket URL: <http://trac.macports.org/ticket/24043>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list