[pulseaudio-discuss] [PATCH 6/8] launch: Add systemd units for launching pulseaudio user instances

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Nov 3 03:38:13 PST 2014


On Mon, 2014-11-03 at 11:32 +0000, Colin Guthrie wrote:
> Tanu Kaskinen wrote on 03/11/14 11:07:
> > On Mon, 2014-11-03 at 09:42 +0000, Colin Guthrie wrote:
> >> diff --git a/src/daemon/systemd/user/pulseaudio.service.in b/src/daemon/systemd/user/pulseaudio.service.in
> >> new file mode 100644
> >> index 0000000..e08ff1e
> >> --- /dev/null
> >> +++ b/src/daemon/systemd/user/pulseaudio.service.in
> >> @@ -0,0 +1,10 @@
> >> +[Unit]
> >> +Description=Sound Service
> >> +
> >> +[Service]
> >> +ExecStart=@PA_BINARY@ --daemonize=no
> >> +Restart=on-failure
> > 
> > In the previous version the restart policy was "always". How does
> > "on-failure" interact with socket activation? If I shut down PulseAudio
> > cleanly with "pactl exit", will PulseAudio be started again when the
> > next client tries to connect to the socket?
> 
> Yeah I took some of the arguments from the other patch series that
> looked sensible and forgot to mention that in my little summary - sorry :(
> 
> 
> Yes, the Restart= directive only applies to the service unit itself - it
> doesn't propagate to the .socket.
> 
> If you exit with pactl exit (or have an idle-timeout configured), then
> the service will die (cleanly) but the socket will still be listening
> and will trigger a start again if someone new connects.
> 
> This is similar to the behaviour when you call "systemctl --user stop
> pulseaudio.service" - in this scenario, systemctl gives you a nice
> warning telling you that although you've stopped the service, it might
> be started again via the socket.

Ok, it's good then! I'm done reviewing the patches - there was just that
one compiler warning, otherwise everything looked good to me.

-- 
Tanu



More information about the pulseaudio-discuss mailing list