App-RunStopRun
view release on metacpan or search on metacpan
bin/run-stop-run view on Meta::CPAN
use File::Spec;
use Getopt::Long qw(:config bundling no_ignore_case require_order);
use IO::Pty;
use List::Util qw(first uniq);
use POSIX qw(:unistd_h :sys_wait_h);
use Pod::Usage;
use Proc::ProcessTable;
use Time::HiRes qw(sleep);
# NOTE: docs claim getpgrp($PID) isn't portable. Also, the POSIX module
# doesn't provide a separate interface for getpgid, though it's part of the
# standard and used internally.
use constant HAS_PORTABLE_GETPGRP =>
!! grep defined, @Config{qw( d_getpgid d_bsdgetpgrp d_getpgrp2 )};
my $filename = (File::Spec->splitpath(__FILE__))[-1];
my @option = (
'verbose|v' => \my $verbose,
'dry-run|n' => \my $dryrun,
'limit|l=f' => \my $limit,
'pid|p=s' => \my @pid,
'run|r=f' => \my $run,
'stop|s=f' => \my $stop,
( run in 0.475 second using v1.01-cache-2.11-cpan-5735350b133 )