-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix supervisor to pass RUBYOPT to worker process #1066
Conversation
MEMO: In windows, we can't specify RUBYOPT directly in command line, then we have to set like: |
if Fluent.windows? | ||
fluentd_spawn_cmd = ServerEngine.ruby_bin_path + " -Eascii-8bit:ascii-8bit " | ||
fluentd_spawn_cmd << ' "' + rubyopt.gsub('"', '""') + '" ' if rubyopt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nurse Is this gsub
safe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not safe. Maybe it should use Shellwords.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@naritta Could you fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shellwords didn't work on windows, then I found this
http://stackoverflow.com/questions/5636601/is-there-an-equivalent-to-the-ruby-shellwords-module-for-the-windows-shell
If I'm misunderstanding, please tell me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sure. It sounds good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot understand the reason why this code is like that.
Please add code comment to explain it.
If there is no concern, I will merge this patch after added the comment. |
Thansk! |
Thank you very much for reviewing. |
Fix #1042
I did't use shellescape in unix for setting various values directly.