AnyEvent-Process
view release on metacpan or search on metacpan
lib/AnyEvent/Process.pm view on Meta::CPAN
Watchdog callback, receives AnyEvent::Process::Job instance as its argument.
If it returns false value, the watched process is killed (see on_kill).
=item kill_interval (in seconds, optional)
Maximum time the process can run. After this time expires, the process is
killed.
=item on_kill (optional, sends SIGKILL by default)
Called, when the process shall be killed. Receives AnyEvent::Process::Job
instance as its argument.
=back
=head2 run
Run a process. Any argument specified to the constructor can be overridden here.
Returns AnyEvent::Process::Job, which represents the new process, or undef on an
error.
=over 4
=item Returned AnyEvent::Process::Job instance has following methods:
=over 4
=item pid
Returns PID of the process.
=item kill
Send signal specified as the argument to the process.
=item close
Close all pipes and socketpairs between this process and the child.
=back
=back
=head2 kill
Run the kill method of the latest created AnyEvent::Process::Job - sends signal
specified as its argument to the process.
=head2 pid
Run the pid method of the latest created AnyEvent::Process::Job - returns PID of
the process.
=head2 close
Run the close method of the latest created AnyEvent::Process::Job.
=head1 SEE ALSO
L<AnyEvent> - Event framework for PERL.
L<AnyEvent::Subprocess> - Similar module, but with more dependencies and a little
more complicated usage.
=head1 AUTHOR
Petr Malat E<lt>oss@malat.bizE<gt> L<http://malat.biz/>
=head1 COPYRIGHT
Copyright (c) 2012 by Petr Malat E<lt>oss@malat.bizE<gt>
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>.
( run in 1.010 second using v1.01-cache-2.11-cpan-63c85eba8c4 )