mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	daemon: Use Type=notify for systemd service
This ensures systemd knows when pulseaudio finishes loading, thus never marking pulseaudio as active if startup fails.
This commit is contained in:
		
							parent
							
								
									2d5eec2d2c
								
							
						
					
					
						commit
						ad047c2c79
					
				
					 2 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -1131,12 +1131,20 @@ int main(int argc, char *argv[]) {
 | 
			
		|||
 | 
			
		||||
    pa_log_info("Daemon startup complete.");
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_SYSTEMD_DAEMON
 | 
			
		||||
    sd_notify(0, "READY=1");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    retval = 0;
 | 
			
		||||
    if (pa_mainloop_run(mainloop, &retval) < 0)
 | 
			
		||||
        goto finish;
 | 
			
		||||
 | 
			
		||||
    pa_log_info("Daemon shutdown initiated.");
 | 
			
		||||
 | 
			
		||||
#ifdef HAVE_SYSTEMD_DAEMON
 | 
			
		||||
    sd_notify(0, "STOPPING=1");
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
finish:
 | 
			
		||||
#ifdef HAVE_DBUS
 | 
			
		||||
    if (server_bus)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue