mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 03:44:55 +00:00 
			
		
		
		
	select.epoll.fromfd(fd) must be not change the inheritable flag of the file
descriptor
This commit is contained in:
		
							parent
							
								
									67973c0279
								
							
						
					
					
						commit
						d72fe89b80
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1212,7 +1212,7 @@ newPyEpoll_Object(PyTypeObject *type, int sizehint, int flags, SOCKET fd)
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
#ifndef HAVE_EPOLL_CREATE1
 | 
			
		||||
    if (_Py_set_inheritable(self->epfd, 0, NULL) < 0) {
 | 
			
		||||
    if (fd == -1 && _Py_set_inheritable(self->epfd, 0, NULL) < 0) {
 | 
			
		||||
        Py_DECREF(self);
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue