diff options
author | Eric Wong <e@80x24.org> | 2019-11-13 03:00:37 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-11-13 21:30:01 +0000 |
commit | 6708bd46bd780ed6aa90521609851cfa7be29cb3 (patch) | |
tree | dba646017c2eeb832521844f2e2656f1e6890628 | |
parent | 8645836f09bd7d1060f124a18bab534ee4970dc0 (diff) | |
download | dtas-6708bd46bd780ed6aa90521609851cfa7be29cb3.tar.gz |
seek_to_cur_pos needs to return `nil', not `false' on dead processes when monitoring processes for readahead.
-rwxr-xr-x | bin/dtas-readahead | 4 |
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) |