mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	daemon: clean up environment when forking off children
This commit is contained in:
		
							parent
							
								
									5f929963d1
								
							
						
					
					
						commit
						a8c0f65fae
					
				
					 2 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -706,7 +706,7 @@ int main(int argc, char *argv[]) {
 | 
			
		|||
#endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pa_set_env("PULSE_INTERNAL", "1");
 | 
			
		||||
    pa_set_env_and_record("PULSE_INTERNAL", "1");
 | 
			
		||||
    pa_assert_se(chdir("/") == 0);
 | 
			
		||||
    umask(0022);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -721,7 +721,7 @@ int main(int argc, char *argv[]) {
 | 
			
		|||
        if (change_user() < 0)
 | 
			
		||||
            goto finish;
 | 
			
		||||
 | 
			
		||||
    pa_set_env("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
 | 
			
		||||
    pa_set_env_and_record("PULSE_SYSTEM", conf->system_instance ? "1" : "0");
 | 
			
		||||
 | 
			
		||||
    pa_log_info(_("This is PulseAudio %s"), PACKAGE_VERSION);
 | 
			
		||||
    pa_log_debug(_("Compilation host: %s"), CANONICAL_HOST);
 | 
			
		||||
| 
						 | 
				
			
			@ -968,6 +968,9 @@ finish:
 | 
			
		|||
    if (valid_pid_file)
 | 
			
		||||
        pa_pid_file_remove();
 | 
			
		||||
 | 
			
		||||
    /* This has no real purpose except making things valgrind-clean */
 | 
			
		||||
    pa_unset_env_recorded();
 | 
			
		||||
 | 
			
		||||
#ifdef OS_IS_WIN32
 | 
			
		||||
    WSACleanup();
 | 
			
		||||
#endif
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue