mirror of
				https://github.com/wangyu-/UDPspeeder.git
				synced 2025-11-04 11:55:37 +08:00 
			
		
		
		
	ignore EINTR
This commit is contained in:
		
							
								
								
									
										11
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								main.cpp
									
									
									
									
									
								
							@@ -705,9 +705,18 @@ int event_loop()
 | 
				
			|||||||
		int nfds = epoll_wait(epollfd, events, max_events, 180 * 1000); //3mins
 | 
							int nfds = epoll_wait(epollfd, events, max_events, 180 * 1000); //3mins
 | 
				
			||||||
		if (nfds < 0)
 | 
							if (nfds < 0)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			mylog(log_fatal,"epoll_wait return %d\n", nfds);
 | 
								if(errno==EINTR  )
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									mylog(log_info,"epoll interrupted by signal,continue\n");
 | 
				
			||||||
 | 
									//myexit(0);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									mylog(log_fatal,"epoll_wait return %d,%s\n", nfds,strerror(errno));
 | 
				
			||||||
				myexit(-1);
 | 
									myexit(-1);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		int n;
 | 
							int n;
 | 
				
			||||||
		int clear_triggered=0;
 | 
							int clear_triggered=0;
 | 
				
			||||||
		for (n = 0; n < nfds; ++n)
 | 
							for (n = 0; n < nfds; ++n)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user