mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	try to remove the directory where the PID file resides in after removing the PID file
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@771 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									0cc2e04157
								
							
						
					
					
						commit
						b0059c679d
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -41,6 +41,7 @@
 | 
			
		|||
 | 
			
		||||
#include <polypcore/util.h>
 | 
			
		||||
#include <polypcore/log.h>
 | 
			
		||||
#include <polypcore/xmalloc.h>
 | 
			
		||||
 | 
			
		||||
#include "pid.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -191,6 +192,7 @@ int pa_pid_file_remove(void) {
 | 
			
		|||
    char fn[PATH_MAX];
 | 
			
		||||
    int ret = -1;
 | 
			
		||||
    pid_t pid;
 | 
			
		||||
    char *p;
 | 
			
		||||
 | 
			
		||||
    pa_runtime_path("pid", fn, sizeof(fn));
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -223,6 +225,11 @@ int pa_pid_file_remove(void) {
 | 
			
		|||
        goto fail;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ((p = pa_parent_dir(fn))) {
 | 
			
		||||
        rmdir(p);
 | 
			
		||||
        pa_xfree(p);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    ret = 0;
 | 
			
		||||
    
 | 
			
		||||
fail:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue