Commit 0b540587 authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Executable] Add a spec for not hanging

parent 76ceafcf
......@@ -19,5 +19,15 @@ module Pod
Open3.expects(:popen3).with('/Spa ces/are"/fun/false').once.returns(result)
Executable.execute_command(cmd, [], true)
end
it "doesn't hang when the spawned process forks a zombie process with the same STDOUT and STDERR" do
cmd = ['-e', <<-RB]
Process.fork { Process.daemon(nil, true); sleep(2) }
puts 'out'
RB
Timeout.timeout(1) do
Executable.execute_command('ruby', cmd, true).should == "out\n"
end
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment