From 687f579ab401cc9ddf63e9901c37c37ab7d4eef1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 28 Mar 2023 11:12:36 +0000 Subject: inotify: wrap with informative error message As encountered by Louis DeLosSantos, Linux inotify is capped by a lesser-known limit than the standard RLIMIT_NOFILE (`ulimit -n`) value. Give the user a hint about the fs.inotify.max_user_instances sysctl knob on EMFILE, since EMFILE alone may mislead users into thinking they've hit the (typically higher) RLIMIT_NOFILE limit. I can test this on my system using: perl -I lib -MPublicInbox::Inotify -E \ 'my @x = map { PublicInbox::Inotify->new } (1..128)' But I hesitate to include it in the test suite since triggering the limit can cause unrelated processes to fail. Link: https://public-inbox.org/meta/CAE6jdTo8iQfNM9Yuk0Dwi-ARMxmQxX-onL8buXcQ9Ze3r0hKrg@mail.gmail.com/ Reported-by: Louis DeLosSantos --- MANIFEST | 1 + 1 file changed, 1 insertion(+) (limited to 'MANIFEST') diff --git a/MANIFEST b/MANIFEST index 40535233..3c421645 100644 --- a/MANIFEST +++ b/MANIFEST @@ -217,6 +217,7 @@ lib/PublicInbox/In2Tie.pm lib/PublicInbox/Inbox.pm lib/PublicInbox/InboxIdle.pm lib/PublicInbox/InboxWritable.pm +lib/PublicInbox/Inotify.pm lib/PublicInbox/InputPipe.pm lib/PublicInbox/Isearch.pm lib/PublicInbox/KQNotify.pm -- cgit v1.2.3-24-ge0c7