mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:44:18 +00:00 
			
		
		
		
	EAGAIN handling for imsg_read. OK henning@ benno@
This commit is contained in:
		
							
								
								
									
										3
									
								
								proc.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								proc.c
									
									
									
									
									
								
							@@ -61,7 +61,8 @@ proc_event_cb(__unused int fd, short events, void *arg)
 | 
				
			|||||||
	struct imsg	 imsg;
 | 
						struct imsg	 imsg;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!(peer->flags & PEER_BAD) && (events & EV_READ)) {
 | 
						if (!(peer->flags & PEER_BAD) && (events & EV_READ)) {
 | 
				
			||||||
		if ((n = imsg_read(&peer->ibuf)) == -1 || n == 0) {
 | 
							if (((n = imsg_read(&peer->ibuf)) == -1 && errno != EAGAIN) ||
 | 
				
			||||||
 | 
							    n == 0) {
 | 
				
			||||||
			peer->dispatchcb(NULL, peer->arg);
 | 
								peer->dispatchcb(NULL, peer->arg);
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user