diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-24 00:34:12 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-24 00:34:12 +0000 |
commit | 2e87ef8b66e4b89fa39e10043a32f37e6ae35ae1 (patch) | |
tree | 46236fe68a586588be99183e43754d7a1d62cda8 /gc.c | |
parent | 86c9a6d49bfebb54d335db6e04b6ca0400dd2d04 (diff) | |
download | ruby-2e87ef8b66e4b89fa39e10043a32f37e6ae35ae1.tar.gz |
rubyspec/core/io/popen_spec: avoid lingering "ruby -e sleep" process
The ruby_cmd helper blindly escapes code blocks passed to it,
causing "sleep" to be quoted in the command-line. This quoting
results in IO.popen using a subshell (/bin/sh) to run the given
string command instead of invoking the Ruby executable directly.
Thus, IO.popen would only see the PID of the subshell via
IO#pid, and merely sending SIGKILL to the subshell would not
result in the child ("ruby -e sleep") being killed.
This problem with lingering ruby processes was easier to
reproduce on slow or heavily-loaded systems using low-scheduling
priority (e.g. "chrt -i 0 make test-rubyspec")
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
0 files changed, 0 insertions, 0 deletions