diff options
author | Eric Wong <e@80x24.org> | 2015-01-19 09:17:51 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-01-19 09:58:47 +0000 |
commit | ef39866fa6e6ac91cc64f18573dea22c3f75c6e1 (patch) | |
tree | 62ab8b9cfdf57acf63b84661f7ed8fa1725b9fc8 /lib/dtas/partstats.rb | |
parent | b95a51440b6378847c4ab5dd4cf9e96e18b5f241 (diff) | |
download | dtas-ef39866fa6e6ac91cc64f18573dea22c3f75c6e1.tar.gz |
Ensure we can apply the workaround to dtas-sourceedit and our test cases while also simplifying the existing call sites a little. This will also make for less code churn in 3-5 years down the line when we drop <= 2.1 support.
Diffstat (limited to 'lib/dtas/partstats.rb')
-rw-r--r-- | lib/dtas/partstats.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/dtas/partstats.rb b/lib/dtas/partstats.rb index 6c714b3..546b88b 100644 --- a/lib/dtas/partstats.rb +++ b/lib/dtas/partstats.rb @@ -10,6 +10,7 @@ require_relative 'sigevent' class DTAS::PartStats CMD = 'sox "$INFILE" -n $TRIMFX $SOXFX stats $STATSOPTS' include DTAS::Process + include DTAS::SpawnFix attr_reader :key_idx attr_reader :key_width @@ -56,12 +57,7 @@ class DTAS::PartStats env["INFILE"] = @infile env["TRIMFX"] = "trim #{trim_part.tbeg}s #{trim_part.tlen}s" opts = { pgroup: true, close_others: true, err: wr } - pid = begin - Process.spawn(env, CMD, opts) - rescue Errno::EINTR - # workaround for older Rubies https://bugs.ruby-lang.org/issues/8770 - retry - end + pid = spawn(env, CMD, opts) wr.close [ pid, rd ] end |