Skip to content

Commit 77bd774

Browse files
committedOct 6, 2015
fix misuage of F_GETFL with F_GETFD
1 parent b62dcfa commit 77bd774

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎kernel/common/io.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def self.new_open_fd(new_fd)
9999
if new_fd > 2
100100
flags = FFI::Platform::POSIX.fcntl(new_fd, F_GETFD, 0)
101101
Errno.handle("fcntl(2) failed") if FFI.call_failed?(flags)
102-
flags = FFI::Platform::POSIX.fcntl(new_fd, F_SETFD, get_flags(new_fd) | FD_CLOEXEC)
102+
flags = FFI::Platform::POSIX.fcntl(new_fd, F_SETFD, flags | FD_CLOEXEC)
103103
Errno.handle("fcntl(2) failed") if FFI.call_failed?(flags)
104104
end
105105

0 commit comments

Comments
 (0)
Please sign in to comment.