System::TimeoutExtend system() to allow timeout after specified seconds | |
Download |
System::Timeout Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Publisher Name:
- ChenGang
- Publisher web site:
- http://search.cpan.org/~chengang/
System::Timeout Tags
System::Timeout Description
Extend system() to allow timeout after specified seconds System::Timeout is a Perl module that extends system() to allow timeout after the specified seconds. This also include a cli tool "timeout" which can be easily used to force command exit after specified seconds. This module is based on core function fork(), exec(), sleep(). These can be useful when invoking system() in daemon.SYNOPSIS use System::Timeout qw(system system_ex system_log); system_ex("sleep 9"); # invoke CORE::system, will not timeout exit system_ex("3", "sleep 9"); # timeout exit after 3 seconds system("3", "sleep 9"); # just an alias for system_ex, for peoples who want to overlay the Perl build-in system_log("3", "sleep 9"); # log the command in file % timeout --timeout=3 "sleep 9" #Run command "Sleep 9" and timeout after 3 seconds Requirements: · Perl
System::Timeout Related Software