]> Sergey Matveev's repositories - public-inbox.git/commit
watch: use signalfd for Maildir watching
authorEric Wong <e@yhbt.net>
Sat, 27 Jun 2020 10:03:37 +0000 (10:03 +0000)
committerEric Wong <e@yhbt.net>
Sun, 28 Jun 2020 22:27:14 +0000 (22:27 +0000)
commit58c0333adbdd9f5f82309cb6eef3c379f0ff064e
tree5e0d2304c4003fcd9c858db4b955abab7e6e3a8f
parentb2b1006759730507731fcd3fc3e0de68239e3b92
watch: use signalfd for Maildir watching

We can get rid of the janky wannabe
self-using-a-directory-instead-of-pipe thing we needed to
workaround Filesys::Notify::Simple being blocking.

For existing Maildir users, this should be more robust and
immune to missed wakeups for signalfd and kqueue-enabled
systems; as well as being immune to BOFHs clearing $TMPDIR
and preventing notifications from firing.

The IMAP IDLE code still uses normal Perl signals, so it's still
vulnerable to missed wakeups.  That will be addressed in future
commits.
lib/PublicInbox/Daemon.pm
lib/PublicInbox/Sigfd.pm
lib/PublicInbox/WatchMaildir.pm
script/public-inbox-watch
t/watch_maildir.t