Skip to content

Commit

Permalink
fix misuage of F_GETFL with F_GETFD
Browse files Browse the repository at this point in the history
  • Loading branch information
chuckremes committed Oct 6, 2015
1 parent b62dcfa commit 77bd774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/common/io.rb
Expand Up @@ -99,7 +99,7 @@ def self.new_open_fd(new_fd)
if new_fd > 2
flags = FFI::Platform::POSIX.fcntl(new_fd, F_GETFD, 0)
Errno.handle("fcntl(2) failed") if FFI.call_failed?(flags)
flags = FFI::Platform::POSIX.fcntl(new_fd, F_SETFD, get_flags(new_fd) | FD_CLOEXEC)
flags = FFI::Platform::POSIX.fcntl(new_fd, F_SETFD, flags | FD_CLOEXEC)
Errno.handle("fcntl(2) failed") if FFI.call_failed?(flags)
end

Expand Down

0 comments on commit 77bd774

Please sign in to comment.