-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mruby-io doesn't work in process started as Windows service #5114
Comments
I agree that (1) is sufficient. Could you prepare a pull-request? Or shall I work on it? |
We don't need to require valid STDIN/STDOUT/STDERR. If we require, we can't use mruby environment that doesn't have valid STDIN/STDOUT/STDERR such as Windows service process. Windows service process doesn't have valid STDIN.
OK. I'll do it. |
We don't need to require valid STDIN/STDOUT/STDERR. If we require, we can't use mruby environment that doesn't have valid STDIN/STDOUT/STDERR such as Windows service process. Windows service process doesn't have valid STDIN.
Hmm. Are you going to make a pull-request from the above commit? Or shall I merge it? |
Sorry for not sharing the status of the commit. But the patch is simple and it'll fix this problem. So we can merge it without waiting the confirmation. (I'll share the result of the confirmation later.) |
We don't need to require valid STDIN/STDOUT/STDERR. If we require it, we can't use mruby on an environment that doesn't have valid STDIN/STDOUT/STDERR such as Windows service process. Windows service process doesn't have valid STDIN.
We don't need to require valid STDIN/STDOUT/STDERR. If we require it, we can't use mruby on an environment that doesn't have valid STDIN/STDOUT/STDERR such as Windows service process. Windows service process doesn't have valid STDIN.
Don't check FD for STDIN/STDOUT/STDERR; #5114
We've confirmed that #5119 fixes this problem. |
Does this fix migw crash issue? |
I think that this is unrelated to the MinGW crash issue. |
#4968 added file descriptor check in
IO#initialize
.It raises an exception at
IO.open(0, "r")
https://github.com/mruby/mruby/blob/master/mrbgems/mruby-io/mrblib/io.rb#L363 when a process is started as Windows service. Because a process started as Windows service doesn't have a valid standard input.fstat(0, buf)
returns non-zero.Here are solutions I think:
0
,1
and2
.0
,1
and2
when they are invalid.Which solution do you like?
I think that 1. is enough.
FYI: CRuby uses 2.:
fill_standard_fds()
https://github.com/ruby/ruby/blob/master/ruby.c#L2556-L2584The text was updated successfully, but these errors were encountered: