everything related to duct tape audio suite (dtas)
 help / color / 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	[flat|nested] only message in thread

only message in thread, back to index

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

everything related to duct tape audio suite (dtas)

Archives are clonable:
	git clone --mirror https://80x24.org/dtas-all
	git clone --mirror http://ou63pmih66umazou.onion/dtas-all

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.audio.dtas
	nntp://ou63pmih66umazou.onion/inbox.comp.audio.dtas

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git