[arch-general] Demons shutdown before processes.

Chris Bannister c.bannister at gmail.com
Mon Jun 15 16:58:01 EDT 2009


2009/6/15 Aaron Griffin <aaronmgriffin at gmail.com>:
> On Mon, Jun 15, 2009 at 3:36 PM, Chris Bannister<c.bannister at gmail.com> wrote:
>> If my soundcard is in use when I shutdown (which it normally is with
>> MPD because I just sudo halt and expect linux to shutdown), this
>> causes OSS to fail to unload, which in turn can leave my /var
>> partition mounted. Is there a specific reason it is done this way?
>
> Well, yes. Shutting down the processes is not very clean. SIGTERM and
> later SIGKILL are sent to all processes to tell them to die. The
> /etc/rc.d/ daemons have a clean way of shutting down, so those are
> done first. There's no way to say "send a SIGTERM to all processes
> except those started by rc.d scripts so I can shut those down cleanly"
>
> If this is truely caused by mpd, I believe our mpd DOES ship with a
> rc.d script, and you can configure your user in the /etc/conf.d/ file.
> This way mpd will be stopped cleanly on shutdown
>


Yeah, I build mpd from git and run it as a user not as a daemon which
why the problem occurs, ive worked around it by changing soundoff to
kill the processes instead of echoing the name to shell.


More information about the arch-general mailing list