diff options
| author | Max Howell | 2009-11-09 17:45:22 +0000 |
|---|---|---|
| committer | Max Howell | 2009-11-09 17:55:13 +0000 |
| commit | 75c7c942a176b8d2b51335b49e3829694ed44340 (patch) | |
| tree | 7f5dd45c9f4b2bbae7f738eaad6719b5fd86a1fe /Library | |
| parent | 1da26d89ea2d2cf5a45c8852288291de6a13d184 (diff) | |
| download | brew-75c7c942a176b8d2b51335b49e3829694ed44340.tar.bz2 | |
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.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b12b39f99..10f1429be 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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 |
