]> Sergey Matveev's repositories - public-inbox.git/commit
watch: wire up IMAP IDLE reapers to DS
authorEric Wong <e@yhbt.net>
Sat, 27 Jun 2020 10:03:39 +0000 (10:03 +0000)
committerEric Wong <e@yhbt.net>
Sun, 28 Jun 2020 22:27:16 +0000 (22:27 +0000)
commitfac2f5b63f0595b67a99784c8a9f9801c1fc9f09
treebb225dd4903a7078dbe1f4a271a2d59cc167777c
parent94096cab6cd5e00c8a36a4a2667bdb9acf43d01f
watch: wire up IMAP IDLE reapers to DS

We can avoid synchronous `waitpid(-1, 0)' and save a process
when simultaneously watching Maildirs.

One DS bug is fixed: ->Reset needs to clear the DS $in_loop flag
in forked children so dwaitpid() fails and allows git processes
to be reaped synchronously.  TestCommon also calls DS->Reset
when spawning new processes, since t/imapd.t uses DS->EventLoop
while waiting on -watch to write.
lib/PublicInbox/DS.pm
lib/PublicInbox/TestCommon.pm
lib/PublicInbox/WatchMaildir.pm
script/public-inbox-watch