* [ruby-core:82874] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows
[not found] <redmine.issue-13920.20170919101046@ruby-lang.org>
@ 2017-09-19 10:10 ` rocifier
2017-09-19 10:15 ` [ruby-core:82875] " rocifier
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: rocifier @ 2017-09-19 10:10 UTC (permalink / raw
To: ruby-core
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, "<STDIN>");`
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:82875] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows
[not found] <redmine.issue-13920.20170919101046@ruby-lang.org>
2017-09-19 10:10 ` [ruby-core:82874] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows rocifier
@ 2017-09-19 10:15 ` rocifier
2017-09-19 12:35 ` [ruby-core:82876] " Greg.mpls
2017-09-20 7:49 ` [ruby-core:82890] " rocifier
3 siblings, 0 replies; 4+ messages in thread
From: rocifier @ 2017-09-19 10:15 UTC (permalink / raw
To: ruby-core
Issue #13920 has been updated by rocifier (Ryan O'Connor).
I am linking to the static library from a win32 application (not console app) set to use the same runtime version as the ruby build. I have tried setting up a console with AllocConsole() and assigning *stdin to this console before initializing ruby, but it doesn't help.
----------------------------------------
Bug #13920: prepping io for stdin returns "access denied" on windows
https://bugs.ruby-lang.org/issues/13920#change-66774
* 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, "<STDIN>");`
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:82876] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows
[not found] <redmine.issue-13920.20170919101046@ruby-lang.org>
2017-09-19 10:10 ` [ruby-core:82874] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows rocifier
2017-09-19 10:15 ` [ruby-core:82875] " rocifier
@ 2017-09-19 12:35 ` Greg.mpls
2017-09-20 7:49 ` [ruby-core:82890] " rocifier
3 siblings, 0 replies; 4+ messages in thread
From: Greg.mpls @ 2017-09-19 12:35 UTC (permalink / raw
To: ruby-core
Issue #13920 has been updated by MSP-Greg (Greg L).
rocifier (Ryan O'Connor) wrote:
> `fileno(stdin)` returns `-2`
Sounds similar to #13546
----------------------------------------
Bug #13920: prepping io for stdin returns "access denied" on windows
https://bugs.ruby-lang.org/issues/13920#change-66775
* 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, "<STDIN>");`
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:82890] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows
[not found] <redmine.issue-13920.20170919101046@ruby-lang.org>
` (2 preceding siblings ...)
2017-09-19 12:35 ` [ruby-core:82876] " Greg.mpls
@ 2017-09-20 7:49 ` rocifier
3 siblings, 0 replies; 4+ messages in thread
From: rocifier @ 2017-09-20 7:49 UTC (permalink / raw
To: ruby-core
Issue #13920 has been updated by rocifier (Ryan O'Connor).
MSP-Greg (Greg L) wrote:
> rocifier (Ryan O'Connor) wrote:
> > `fileno(stdin)` returns `-2`
>
> Sounds similar to #13546
Thanks my issue is very similar. The issue you linked to presents some undocumented requirements. When I try calling `rb_w32_sysinit` it crashes on this line:
https://github.com/ruby/ruby/blob/c08f7b80889b531865e74bc5f573df8fa27f2088/win32/win32.c#L839
What is the exact version of ucrtbased.dll that the assembly code in this function is designed for?
----------------------------------------
Bug #13920: prepping io for stdin returns "access denied" on windows
https://bugs.ruby-lang.org/issues/13920#change-66789
* 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, "<STDIN>");`
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-20 7:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-13920.20170919101046@ruby-lang.org>
2017-09-19 10:10 ` [ruby-core:82874] [Ruby trunk Bug#13920] prepping io for stdin returns "access denied" on windows rocifier
2017-09-19 10:15 ` [ruby-core:82875] " rocifier
2017-09-19 12:35 ` [ruby-core:82876] " Greg.mpls
2017-09-20 7:49 ` [ruby-core:82890] " rocifier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).