From 6708bd46bd780ed6aa90521609851cfa7be29cb3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 13 Nov 2019 03:00:37 +0000 Subject: readahead: avoid Array#compact and Array#max on `false' seek_to_cur_pos needs to return `nil', not `false' on dead processes when monitoring processes for readahead. --- bin/dtas-readahead | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin') 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) -- cgit v1.2.3-24-ge0c7