[pulseaudio-discuss] [PATCH] Use Type=notify for systemd service

Felipe Sateler fsateler at debian.org
Tue Aug 11 03:57:50 PDT 2015


On 11 Aug 2015 06:49, "Tanu Kaskinen" <tanuk at iki.fi> wrote:
>
> On Thu, 2015-08-06 at 09:05 -0300, Felipe Sateler wrote:
> > On 6 August 2015 at 05:14, Peter Meerwald <pmeerw at pmeerw.net> wrote:
> > >
> > > > This ensures systemd knows when pulseaudio finishes loading, thus
> > > > never
> > > > marking pulseaudio as active if startup fails.
> > >
> > > the notify thing doesn't work together with --daemonize;
> >
> > This can be solved by either setting NotifyAccess=all in the unit or
> > passing the main pid back to systemd at fork time (I haven't actually
> > tried this but should work). The latter should be the best option of
> > these 2,
> > but maybe we should just document the --no-daemonize requirement? I
> > doubt there is actually a need to run pulseaudio daemonized uner
> > systemd.
>
> Does this problem only exist when PulseAudio is managed by systemd?
> That is, the sd_notify() calls are harmless if PulseAudio was started
> via some other means? If so, then I agree with Felipe - I think it's
> sufficient to document that --daemonize shouldn't be used in systemd
> unit files.

Yes, sd_notify does nothing when not invoked via systemd. This works via a
socket passed via an environment variable. If that variable is not set,
then sd_notify just returns.

Where should that be documented?  Is a comment in the unit  enough, or
should this be in the man page somewhere?

Saludos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20150811/111f3613/attachment.html>


More information about the pulseaudio-discuss mailing list