diff options
author | Eric Wong <e@80x24.org> | 2021-01-10 12:15:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-12 03:51:42 +0000 |
commit | b90e8d6e02852c47d0c08198d8c7afb5dbe008d7 (patch) | |
tree | ea3b399fba66acbd5b67bb5d1b983340ddcc17d3 /lib/PublicInbox/Watch.pm | |
parent | f4cf089b427d07bedb80fcfbe79d84234ad92a75 (diff) | |
download | public-inbox-b90e8d6e02852c47d0c08198d8c7afb5dbe008d7.tar.gz |
This lets us call dwaitpid long before a process exits and not have to wait around for it. This is advantageous for lei where we can run dwaitpid on the pager as soon as we spawn it, instead of waiting for a client socket to go away on DESTROY.
Diffstat (limited to 'lib/PublicInbox/Watch.pm')
-rw-r--r-- | lib/PublicInbox/Watch.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/Watch.pm b/lib/PublicInbox/Watch.pm index c39ce1a7..9a729140 100644 --- a/lib/PublicInbox/Watch.pm +++ b/lib/PublicInbox/Watch.pm @@ -583,13 +583,13 @@ sub watch_atfork_child ($) { delete $self->{opendirs}; PublicInbox::DS->Reset; %SIG = (%SIG, %{$self->{sig}}, CHLD => 'DEFAULT'); - PublicInbox::Sigfd::sig_setmask($self->{oldset}); + PublicInbox::DS::sig_setmask($self->{oldset}); } sub watch_atfork_parent ($) { my ($self) = @_; _done_for_now($self); - PublicInbox::Sigfd::block_signals(); + PublicInbox::DS::block_signals(); } sub imap_idle_requeue ($) { # DS::add_timer callback @@ -648,7 +648,7 @@ sub event_step { imap_idle_fork($self, $url_intvl); } }; - PublicInbox::Sigfd::sig_setmask($oldset); + PublicInbox::DS::sig_setmask($oldset); die $@ if $@; } fs_scan_step($self) if $self->{mdre}; @@ -716,7 +716,7 @@ sub poll_fetch_fork ($) { # DS::add_timer callback close $w; _exit(0); } - PublicInbox::Sigfd::sig_setmask($oldset); + PublicInbox::DS::sig_setmask($oldset); die "fork: $!" unless defined $pid; $self->{poll_pids}->{$pid} = [ $intvl, $urls ]; PublicInbox::EOFpipe->new($r, \&reap, [$pid, \&poll_fetch_reap, $self]); |