From a1733d3406dfbde52d1468e671edd1d76893f546 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 15 Oct 2021 13:30:55 +0000 Subject: 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. --- lib/PublicInbox/LeiConvert.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiConvert.pm') diff --git a/lib/PublicInbox/LeiConvert.pm b/lib/PublicInbox/LeiConvert.pm index 9e98edc3..68fc7c0b 100644 --- a/lib/PublicInbox/LeiConvert.pm +++ b/lib/PublicInbox/LeiConvert.pm @@ -58,7 +58,7 @@ sub lei_convert { # the main "lei convert" method my ($op_c, $ops) = $lei->workers_start($self, 1); $lei->{wq1} = $self; $self->wq_io_do('process_inputs', []); - $self->wq_close(1); + $self->wq_close; $lei->wait_wq_events($op_c, $ops); } -- cgit v1.2.3-24-ge0c7