mirror of
				https://github.com/alsa-project/alsa-lib.git
				synced 2025-10-29 05:40:25 -04:00 
			
		
		
		
	pcm: Add error handler for read that snd_pcm_share_thread function calls
				
					
				
			This commit is contained in:
		
							parent
							
								
									81a7a93636
								
							
						
					
					
						commit
						46aed20b32
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		|  | @ -414,7 +414,12 @@ static void *snd_pcm_share_thread(void *data) | |||
| 			Pthread_mutex_lock(&slave->mutex); | ||||
| 			if (pfd[0].revents & POLLIN) { | ||||
| 				char buf[1]; | ||||
| 				read(pfd[0].fd, buf, 1); | ||||
| 				err = read(pfd[0].fd, buf, 1); | ||||
| 				if (err < 0) { | ||||
| 					SYSERR("can't read from a pipe"); | ||||
| 					Pthread_mutex_unlock(&slave->mutex); | ||||
| 					return NULL; | ||||
| 				} | ||||
| 			} | ||||
| 		} else { | ||||
| 			slave->polling = 0; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Tomohiro IKEDA
						Tomohiro IKEDA