From 5be0cb101bab44167a78af7a2d167f254c95bdb3 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 23 Mar 2021 11:02:17 +0600 Subject: lei mark: command for (un)setting keywords and labels Only tested for keywords and labels with file inputs, so far; but it seems to do what it needs to do. There's a bit more redundant code than I'd like, and more opportunities for code sharing in the future "lei import" will be expanded to support +kw:$KEYWORD and +L:$LABEL in the future. --- lib/PublicInbox/LeiInput.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiInput.pm') diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index 859fdb11..6ad57772 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -45,7 +45,7 @@ error reading $name: $! } } -sub prepare_inputs { +sub prepare_inputs { # returns undef on error my ($self, $lei, $inputs) = @_; my $in_fmt = $lei->{opt}->{'in-format'}; if ($lei->{opt}->{stdin}) { @@ -103,4 +103,13 @@ sub prepare_inputs { $self->{inputs} = $inputs; } +sub input_only_atfork_child { + my ($self) = @_; + my $lei = $self->{lei}; + $lei->lei_atfork_child; + PublicInbox::IPC::ipc_atfork_child($self); + $lei->{auth}->do_auth_atfork($self) if $lei->{auth}; + undef; +} + 1; -- cgit v1.2.3-24-ge0c7