Ticket #27578 (closed defect: worksforme)
mpd: killing daemon with "launchctl -w unload ..." has no visible effect (kills wrong process)
|Reported by:||greg@…||Owned by:||rmstonecipher@…|
I have installed mpd 0.15.15 and made just enough changes to /opt/local/etc/mpd.conf so that mpd runs usefully. I can start the daemon with
sudo launchctl load -w /Library/LaunchDaemons/org.macports.mpd.plist
And now I can see two processes running:
$ ps -Aj | grep mpd | grep -v grep root 17635 1 17635 1edfd1c 0 Ss ?? 0:00.02 /opt/local/bin/daemondo --label=mpd --start-cmd /opt/local/etc/Launch root 17637 1 17635 1edfd1c 0 S ?? 0:03.69 /opt/local/bin/mpd --no-daemon /opt/local/etc/mpd.conf
Note that one of these processes is mpd itself, and the other a daemondo instance that is presumably responsible for mpd. Seems reasonable.
Now let's say I decide to stop the daemon. My limited understanding of launchd leads me to believe that I am supposed to run
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mpd.plist
However, this has no visible effect: mpd keeps running and the music keeps playing.
What seems to have happened is that the daemondo instance started by "launchctl load" was killed:
$ ps -Aj | grep mpd | grep -v grep root 17637 1 17635 1edfd1c 0 S ?? 0:20.20 /opt/local/bin/mpd --no-daemon /opt/local/etc/mpd.conf
I expected both that daemondo instance and mpd to be killed.
- Cc rmstonecipher@… added
- Owner changed from macports-tickets@… to milosh@…
- Port set to mpd
- Owner changed from milosh@… to rmstonecipher@…
- Cc rmstonecipher@… removed