=head1 NAME
Mojo::IOLoop::ProcBackground - IOLoop interface to Proc::Background
=head1 VERSION
0.04
=head1 DESCRIPTION
This is an IOLoop interface to Proc::Background.
From Proc::Background:
This is a generic interface for placing processes in the background on both Unix and
Win32 platforms. This module lets you start, kill, wait on, retrieve exit values, and
see if background processes still exist.
=head1 SYNOPSIS
use Mojolicious::Lite;
use Mojo::IOLoop::ProcBackground;
use File::Temp;
use File::Spec;
use Proc::Background;
any '/run' => sub {
my $self = shift;
# Setup our request to take a while
Mojo::IOLoop->stream($self->tx->connection)->timeout(30);
$self->render_later;
$self->on(finish => sub {
$self->app->log->debug("Finished");
});
# We want the UserAgent to see something as soon as possible
$self->res->code(200);
$self->res->headers->content_type('text/html');
$self->write_chunk("