about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/LEI.pm5
-rwxr-xr-xscript/lei8
2 files changed, 0 insertions, 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";