]> Sergey Matveev's repositories - public-inbox.git/blob - lib/PublicInbox/ParentPipe.pm
ds: remove pointless exit calls
[public-inbox.git] / lib / PublicInbox / ParentPipe.pm
1 # Copyright (C) 2016-2018 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
3 # only for PublicInbox::Daemon
4 package PublicInbox::ParentPipe;
5 use strict;
6 use warnings;
7 use base qw(PublicInbox::DS);
8 use fields qw(cb);
9
10 sub new ($$$) {
11         my ($class, $pipe, $cb) = @_;
12         my $self = fields::new($class);
13         $self->SUPER::new($pipe, PublicInbox::DS::EPOLLIN());
14         $self->{cb} = $cb;
15         $self;
16 }
17
18 sub event_step { $_[0]->{cb}->($_[0]) }
19
20 1;