You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've tested this on ruby1.9 and ruby2.0 and tried different versions of posix-spawn gem. These include 0.3.5, 0.3.9, 0.3.11. This snippet I had ran on Amazon Linux as root user. Here is example of code:
require'pp'require'posix-spawn'# I've used mcollective here, but other services I've tried gave same resultformulate_command="service mcollective restart"pp'start'process=POSIX::Spawn::Child.new(formulate_command)ppprocesspp'end'
I've tested this on
ruby1.9
andruby2.0
and tried different versions ofposix-spawn
gem. These include 0.3.5, 0.3.9, 0.3.11. This snippet I had ran on Amazon Linux asroot
user. Here is example of code:This will freeze and it will never return process object, I've debugged code and it freezes on line https://github.com/rtomayko/posix-spawn/blob/master/lib/posix/spawn/child.rb#L228.
Interesting thing is, if I run same command with
sudo
prefix it will work.Also both commands will work if run with
Kernel#system
andKernel#``.
POSIX::Spawn#popen4` will also not work for case described above.EDIT
After some investigation I find that this issue is probably related to this http://stackoverflow.com/questions/8952043/how-to-fix-hanging-popen3-in-ruby
The text was updated successfully, but these errors were encountered: