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

Felipe Sateler fsateler at debian.org
Thu Aug 6 05:05:45 PDT 2015

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.

> not sure how
> obvious that is but maybe a warning for the user would be good

I think notifying systemd of the main pid is simpler than warning, one
would have to detect running under systemd (how? systemd-activated
does not imply socket activated), and warn if the unit if of
Type=simple (this would require querying the systemd dbus api).


Felipe Sateler

More information about the pulseaudio-discuss mailing list