about summary refs log tree commit homepage
path: root/lib/dtas/partstats.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dtas/partstats.rb')
-rw-r--r--lib/dtas/partstats.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/dtas/partstats.rb b/lib/dtas/partstats.rb
index 76e4940..6c714b3 100644
--- a/lib/dtas/partstats.rb
+++ b/lib/dtas/partstats.rb
@@ -49,7 +49,7 @@ class DTAS::PartStats
     rv
   end
 
-  def spawn(trim_part, opts)
+  def partstats_spawn(trim_part, opts)
     rd, wr = IO.pipe
     env = opts[:env]
     env = env ? env.dup : {}
@@ -58,7 +58,8 @@ class DTAS::PartStats
     opts = { pgroup: true, close_others: true, err: wr }
     pid = begin
       Process.spawn(env, CMD, opts)
-    rescue Errno::EINTR # Ruby bug?
+    rescue Errno::EINTR
+      # workaround for older Rubies https://bugs.ruby-lang.org/issues/8770
       retry
     end
     wr.close
@@ -74,7 +75,7 @@ class DTAS::PartStats
     stats = []
     fails = []
     do_spawn = lambda do |trim_part|
-      pid, rpipe = spawn(trim_part, opts)
+      pid, rpipe = partstats_spawn(trim_part, opts)
       rset[rpipe] = [ trim_part, "" ]
       pids[pid] = [ trim_part, rpipe ]
     end