Skip to content

Commit 2cb38f3

Browse files
committedJan 24, 2018
Semi-silently ignore close_on_exec= on Windows for now.
Fixes #4910.
1 parent c9bfede commit 2cb38f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎core/src/main/java/org/jruby/RubyIO.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2185,8 +2185,8 @@ public IRubyObject close_on_exec_set(ThreadContext context, IRubyObject arg) {
21852185
int fd = -1;
21862186

21872187
if (fptr == null || (fd = fptr.fd().realFileno) == -1
2188-
|| !posix.isNative()) {
2189-
runtime.getWarnings().warning("close_on_exec is not implemented for this stream type: " + fptr.fd().ch.getClass().getSimpleName());
2188+
|| !posix.isNative() || Platform.IS_WINDOWS ) {
2189+
runtime.getWarnings().warning("close_on_exec is not implemented on this platform for this stream type: " + fptr.fd().ch.getClass().getSimpleName());
21902190
return context.nil;
21912191
}
21922192

0 commit comments

Comments
 (0)
Please sign in to comment.