I’ve blanked entirely. When I run the following the program hangs indefinitely.
require 'eventmachine'
EM.run do
EM.system '/usr/bin/md5sum', proc{ |p| p.send_data("hashme") } do |stdout, status|
puts stdout
EM.stop
end
end
How do I send EOF to close up the stdin side of the pipe? I note that the system documentation cheats somewhat by feeding exit to sh. I’m using EM 0.12.10.
Are you using master, or 0.12.? Use mast.r