worker_pipe => IO::Pipe->new
};
+ # This is kind of kinky, but allows us to avoid requiring Socket::Linux.
+ # A simple "Socket::Linux"->use won't suffice since we need access to
+ # all of it's bareword constants as well.
+ eval <<' EVAL';
+ use Socket::Linux qw(TCP_KEEPINTVL TCP_KEEPIDLE TCP_KEEPCNT);
+ setsockopt($self->{server}->{client}, SOL_SOCKET, SO_KEEPALIVE, 1);
+ setsockopt($self->{server}->{client}, IPPROTO_TCP, TCP_KEEPIDLE, 120);
+ setsockopt($self->{server}->{client}, IPPROTO_TCP, TCP_KEEPINTVL, 10);
+ EVAL
+
my $pid = fork();
if (!defined($pid) or $pid < 0) {
syslog('LOG_ERR', "Unable to fork new child process $!");