mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-11-03 09:01:52 -05:00 
			
		
		
		
	Kill the zombie process creation, use 'start' process to detach the server_job() from parent
This commit is contained in:
		
							parent
							
								
									cb1f308ab5
								
							
						
					
					
						commit
						c18c32b26c
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -313,7 +313,12 @@ int snd_pcm_direct_server_create(snd_pcm_direct_t *dmix)
 | 
				
			||||||
		close(dmix->server_fd);
 | 
							close(dmix->server_fd);
 | 
				
			||||||
		return ret;
 | 
							return ret;
 | 
				
			||||||
	} else if (ret == 0) {
 | 
						} else if (ret == 0) {
 | 
				
			||||||
		server_job(dmix);
 | 
							ret = fork();
 | 
				
			||||||
 | 
							if (ret == 0)
 | 
				
			||||||
 | 
								server_job(dmix);
 | 
				
			||||||
 | 
							exit(EXIT_SUCCESS);
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							waitpid(ret, NULL, 0);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	dmix->server_pid = ret;
 | 
						dmix->server_pid = ret;
 | 
				
			||||||
	dmix->server = 1;
 | 
						dmix->server = 1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue