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
|
||||
else
|
||||
rd, wr = IO.pipe
|
||||
fork do
|
||||
pid = fork do
|
||||
rd.close
|
||||
$stdout.reopen wr
|
||||
$stderr.reopen wr
|
||||
exec cmd, *args
|
||||
end
|
||||
wr.close
|
||||
out = ''
|
||||
ignore_interrupts do
|
||||
wr.close
|
||||
out << rd.read until rd.eof?
|
||||
end
|
||||
out << rd.read until rd.eof?
|
||||
Process.wait
|
||||
unless $?.success?
|
||||
puts out
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user