From: rocifier@... Date: 2017-09-19T10:10:47+00:00 Subject: [ruby-core:82874] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows Issue #13920 has been reported by rocifier (Ryan O'Connor). ---------------------------------------- Bug #13920: prepping io for stdin returns "access denied" on windows https://bugs.ruby-lang.org/issues/13920 * Author: rocifier (Ryan O'Connor) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: 2.5.0 * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- https://github.com/ruby/ruby/blob/c08f7b80889b531865e74bc5f573df8fa27f2088/io.c#L12730 `rb_stdin = prep_stdio(stdin, FMODE_READABLE, rb_cIO, "");` When this line (io.c) is called upon initialising ruby with `ruby_init()` or `ruby_setup()` and the library is built with `VS2015 x86 Native Tools Command Prompt`, `fileno(stdin)` returns `-2` and `errno` is set to `13`. This raises a ruby exception and fails setup. The library has been tested with /MD and /MDd and with 2.4.2 and 2.5.0 -- https://bugs.ruby-lang.org/ Unsubscribe: