From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 09/13] lei: drop BSD::Resource usage
Date: Sun, 7 Feb 2021 23:05:17 -1000 [thread overview]
Message-ID: <20210208090521.28909-10-e@80x24.org> (raw)
In-Reply-To: <20210208090521.28909-1-e@80x24.org>
It's no longer necessary with the changes to stop doing
FD passing in our backend.
cf. commits 5180ed0a1cd65139 and 7d440bf3667b8ef5
("lei q: eliminate $not_done temporary git dir hack")
("lei q: reorder internals to reduce FD passing")
---
lib/PublicInbox/LEI.pm | 5 -----
script/lei | 8 --------
2 files changed, 13 deletions(-)
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index cddb94e9..e2a945a4 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -941,11 +941,6 @@ sub lazy_start {
$! = $errno; # allow interpolation to stringify in die
die "connect($path): $!";
}
- if (eval { require BSD::Resource }) {
- my $NOFILE = BSD::Resource::RLIMIT_NOFILE();
- my ($s, $h) = BSD::Resource::getrlimit($NOFILE);
- BSD::Resource::setrlimit($NOFILE, $h, $h) if $s < $h;
- }
umask(077) // die("umask(077): $!");
bind($listener, $addr) or die "bind($path): $!";
listen($listener, 1024) or die "listen: $!";
diff --git a/script/lei b/script/lei
index 0b0e2976..cb605e2e 100755
--- a/script/lei
+++ b/script/lei
@@ -82,14 +82,6 @@ Falling back to (slow) one-shot mode
while (my ($k, $v) = each %ENV) { $buf .= "\0$k=$v" }
$buf .= "\0\0";
my $n = $send_cmd->($sock, [0, 1, 2, fileno($dh)], $buf, MSG_EOR);
- if (!$n && $!{ETOOMANYREFS} && eval { require BSD::Resource }) {
- my $NOFILE = BSD::Resource::RLIMIT_NOFILE();
- my ($s, $h) = BSD::Resource::getrlimit($NOFILE);
- if ($s < $h && BSD::Resource::setrlimit($NOFILE, $h, $h)) {
- $n = $send_cmd->($sock, [0, 1, 2, fileno($dh)],
- $buf, MSG_EOR);
- }
- }
if (!$n) {
die "sendmsg: $! (check RLIMIT_NOFILE)\n" if $!{ETOOMANYREFS};
die "sendmsg: $!\n";
next prev parent reply other threads:[~2021-02-08 9:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 9:05 [PATCH 00/13] lei approxidate, startup fix, --alert Eric Wong
2021-02-08 9:05 ` [PATCHv2 01/13] lei q: improve remote mboxrd UX + MUA Eric Wong
2021-02-08 9:05 ` [PATCH 02/13] lei_xsearch: quiet Eml warnings from remote mboxrds Eric Wong
2021-02-08 9:05 ` [PATCH 03/13] lei q: SIGWINCH process group with the terminal Eric Wong
2021-02-08 9:05 ` [PATCH 04/13] lei q: support --alert=CMD for early MUA users Eric Wong
2021-02-08 9:05 ` [PATCH 05/13] tests: favor IPv6 Eric Wong
2021-02-08 9:05 ` [PATCH 06/13] ds: improve add_timer usability Eric Wong
2021-02-08 9:05 ` [PATCH 07/13] lei: start_pager: drop COLUMNS default Eric Wong
2021-02-08 9:05 ` [PATCH 08/13] lei: avoid racing on unlink + bind + listen Eric Wong
2021-02-08 9:05 ` Eric Wong [this message]
2021-02-08 9:05 ` [PATCH 10/13] git: implement date_parse method Eric Wong
2021-02-08 9:05 ` [PATCH 11/13] lei q: use git approxidate with d:, dt: and rt: ranges Eric Wong
2021-02-10 9:59 ` [PATCH] search: fix argv handling of quoted phrases Eric Wong
2021-02-08 9:05 ` [PATCH 12/13] search: use one git-rev-parse process for all dates Eric Wong
2021-02-08 9:05 ` [PATCH 13/13] spawnpp: raise exception on E2BIG errors 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=20210208090521.28909-10-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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.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).