[pulseaudio-discuss] [PATCH] Use Type=notify for systemd service
tanuk at iki.fi
Tue Aug 11 05:00:20 PDT 2015
On Tue, 2015-08-11 at 07:57 -0300, Felipe Sateler wrote:
> 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
> then sd_notify just returns.
> Where should that be documented? Is a comment in the unit enough,
> should this be in the man page somewhere?
I was thinking the pulseaudio man page, the section that documents the
--daemonize switch, but it sounds like a good idea to put a comment to
the unit file too. So I'm in favour of putting a warning to both
More information about the pulseaudio-discuss