about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-11-13 03:00:37 +0000
committerEric Wong <e@80x24.org>2019-11-13 21:30:01 +0000
commit6708bd46bd780ed6aa90521609851cfa7be29cb3 (patch)
treedba646017c2eeb832521844f2e2656f1e6890628
parent8645836f09bd7d1060f124a18bab534ee4970dc0 (diff)
downloaddtas-6708bd46bd780ed6aa90521609851cfa7be29cb3.tar.gz
seek_to_cur_pos needs to return `nil', not `false' on
dead processes when monitoring processes for readahead.
-rwxr-xr-xbin/dtas-readahead4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/dtas-readahead b/bin/dtas-readahead
index 93ab8c9..99ba65c 100755
--- a/bin/dtas-readahead
+++ b/bin/dtas-readahead
@@ -57,7 +57,7 @@ def seek_to_cur_pos(cur_pid, fp)
       end
     end
   rescue Errno::ENOENT => e # race, process is dead
-    return false
+    return nil
   rescue => e
     warn "error reading FDs from for PID:#{cur_pid}: #{e.message}"
   end
@@ -71,7 +71,7 @@ def seek_to_cur_pos(cur_pid, fp)
   end
   pos
 rescue Errno::ENOENT => e # race, process is dead
-  return false
+  return nil
 end
 
 def children_of(ppid)