everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
* [PATCH] readahead: avoid Array#compact and Array#max on `false'
@ 2019-11-13  3:00 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2019-11-13  3:00 UTC (permalink / raw)
  To: dtas-all

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(-)

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)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-13  3:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13  3:00 [PATCH] readahead: avoid Array#compact and Array#max on `false' Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).