From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id C711A1F4B5 for ; Wed, 13 Nov 2019 03:00:45 +0000 (UTC) Received: from localhost ([::1]:41140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUitg-0001Qs-H8 for e@80x24.org; Tue, 12 Nov 2019 22:00:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35735) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUite-0001Qk-LZ for dtas-all@nongnu.org; Tue, 12 Nov 2019 22:00:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUitd-0003IY-Ky for dtas-all@nongnu.org; Tue, 12 Nov 2019 22:00:42 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:49352) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iUitd-0003GT-G6 for dtas-all@nongnu.org; Tue, 12 Nov 2019 22:00:41 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8A8301F4B5 for ; Wed, 13 Nov 2019 03:00:37 +0000 (UTC) From: Eric Wong To: dtas-all@nongnu.org Subject: [PATCH] readahead: avoid Array#compact and Array#max on `false' Date: Wed, 13 Nov 2019 03:00:37 +0000 Message-Id: <20191113030037.653-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.71.152.64 X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: duct tape audio suite List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+e=80x24.org@nongnu.org Sender: "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 =3D> e # race, process is dead - return false + return nil rescue =3D> 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 =3D> e # race, process is dead - return false + return nil end =20 def children_of(ppid)