mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +01:00 
			
		
		
		
	Bug 613601 - buglet in dup_close_on_exec_fd()
Fix copy/paste error and 'or' FD_CLOEXEC into the existing flags instead of just setting it outright.
This commit is contained in:
		| @@ -117,10 +117,15 @@ dup_close_on_exec_fd (gint     fd, | ||||
|     } | ||||
|  | ||||
|   do | ||||
|     s = fcntl (new_fd, F_SETFD, FD_CLOEXEC); | ||||
|     { | ||||
|       s = fcntl (new_fd, F_GETFD); | ||||
|  | ||||
|       if (s >= 0) | ||||
|         s = fcntl (new_fd, F_SETFD, (long) (s | FD_CLOEXEC)); | ||||
|     } | ||||
|   while (s < 0 && (errno == EINTR)); | ||||
|  | ||||
|   if (new_fd < 0) | ||||
|   if (s < 0) | ||||
|     { | ||||
|       int saved_errno = errno; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user