Don't ignore interupts during Formula.system
As I understand it (I tested too), signal propogation is handled by the parent Ruby process. However this was working mostly anyway. So I don't fully understand what is going on. However this seems to not hang in Process.wait where it was before for one test case.
This commit is contained in:
parent
1da26d89ea
commit
75c7c942a1
@ -222,17 +222,15 @@ protected
|
|||||||
safe_system cmd, *args
|
safe_system cmd, *args
|
||||||
else
|
else
|
||||||
rd, wr = IO.pipe
|
rd, wr = IO.pipe
|
||||||
fork do
|
pid = fork do
|
||||||
rd.close
|
rd.close
|
||||||
$stdout.reopen wr
|
$stdout.reopen wr
|
||||||
$stderr.reopen wr
|
$stderr.reopen wr
|
||||||
exec cmd, *args
|
exec cmd, *args
|
||||||
end
|
end
|
||||||
|
wr.close
|
||||||
out = ''
|
out = ''
|
||||||
ignore_interrupts do
|
out << rd.read until rd.eof?
|
||||||
wr.close
|
|
||||||
out << rd.read until rd.eof?
|
|
||||||
end
|
|
||||||
Process.wait
|
Process.wait
|
||||||
unless $?.success?
|
unless $?.success?
|
||||||
puts out
|
puts out
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user