mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	use real path of binary instead of /proc/self/exe to execute ourselves
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1976 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									27d6b7b473
								
							
						
					
					
						commit
						a46804a8e2
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -336,11 +336,14 @@ int main(int argc, char *argv[]) {
 | 
				
			||||||
    */
 | 
					    */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!getenv("LD_BIND_NOW")) {
 | 
					    if (!getenv("LD_BIND_NOW")) {
 | 
				
			||||||
        putenv(pa_xstrdup("LD_BIND_NOW=1"));
 | 
					        char *rp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* We have to execute ourselves, because the libc caches the
 | 
					        /* We have to execute ourselves, because the libc caches the
 | 
				
			||||||
         * value of $LD_BIND_NOW on initialization. */
 | 
					         * value of $LD_BIND_NOW on initialization. */
 | 
				
			||||||
        pa_assert_se(execv("/proc/self/exe", argv) == 0);
 | 
					
 | 
				
			||||||
 | 
					        putenv(pa_xstrdup("LD_BIND_NOW=1"));
 | 
				
			||||||
 | 
					        pa_assert_se(rp = pa_readlink("/proc/self/exe"));
 | 
				
			||||||
 | 
					        pa_assert_se(execv(rp, argv) == 0);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue