]> Sergey Matveev's repositories - public-inbox.git/commit
lei + ipc: simplify process reaping
authorEric Wong <e@80x24.org>
Fri, 15 Oct 2021 13:30:55 +0000 (13:30 +0000)
committerEric Wong <e@80x24.org>
Fri, 15 Oct 2021 15:58:24 +0000 (15:58 +0000)
commita1733d3406dfbde52d1468e671edd1d76893f546
tree118763410e5c6f32776671a435595792f0555ee4
parent2ca12a7fd78d7c9c27fec4f50fdcb58f9c838003
lei + ipc: simplify process reaping

Simplify our APIs and force dwaitpid() to work in async mode for
all lei workers.  This avoids having lingering zombies for
parallel searches if one worker finishes soon before another.

The old distinction between "old" and "new" workers was
needlessly complex, error-prone, and embarrasingly bad.

We also never handled v2:// writers properly before on
Ctrl-C/Ctrl-Z (SIGINT/SIGTSTP), so add them to @WQ_KEYS
to ensure they get handled by $lei when appropropriate.
16 files changed:
lib/PublicInbox/IPC.pm
lib/PublicInbox/LEI.pm
lib/PublicInbox/LeiBlob.pm
lib/PublicInbox/LeiConvert.pm
lib/PublicInbox/LeiImportKw.pm
lib/PublicInbox/LeiInput.pm
lib/PublicInbox/LeiInspect.pm
lib/PublicInbox/LeiLsSearch.pm
lib/PublicInbox/LeiMirror.pm
lib/PublicInbox/LeiNoteEvent.pm
lib/PublicInbox/LeiP2q.pm
lib/PublicInbox/LeiPmdir.pm
lib/PublicInbox/LeiStore.pm
lib/PublicInbox/LeiToMail.pm
lib/PublicInbox/LeiUp.pm
lib/PublicInbox/LeiXSearch.pm