unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/2] dskqxs: get rid of needless confess check
Date: Tue,  5 Sep 2023 07:37:25 +0000	[thread overview]
Message-ID: <20230905073725.169-1-e@80x24.org> (raw)

Destruction order is unpredictable at process teardown,
so confessing or warning here is unnecessary, just break
out of the sub since it's for to delete an entry, anyways.
---
 lib/PublicInbox/DSKQXS.pm | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/PublicInbox/DSKQXS.pm b/lib/PublicInbox/DSKQXS.pm
index 7bd7773e..3fcb4e40 100644
--- a/lib/PublicInbox/DSKQXS.pm
+++ b/lib/PublicInbox/DSKQXS.pm
@@ -106,8 +106,7 @@ sub epoll_ctl {
 		$kq->EV_SET($fd, EVFILT_READ, kq_flag(EPOLLIN, $ev));
 		eval { $kq->EV_SET($fd, EVFILT_WRITE, kq_flag(EPOLLOUT, $ev)) };
 	} elsif ($op == EPOLL_CTL_DEL) {
-		use Carp ();
-		$kq // Carp::confess("nokq $fd");
+		$kq // return; # called in cleanup
 		$kq->EV_SET($fd, EVFILT_READ, EV_DISABLE);
 		eval { $kq->EV_SET($fd, EVFILT_WRITE, EV_DISABLE) };
 	} else { # EPOLL_CTL_ADD

             reply	other threads:[~2023-09-05  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05  7:37 Eric Wong [this message]
2023-09-05  7:39 ` there's no 2/2, yet :x Eric Wong
2023-09-08  0:49   ` [PATCH 2/2] fake_inotify + kqnotify: rewrite and combine code Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230905073725.169-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).