App-govproc-pericmd

 view release on metacpan or  search on metacpan

script/govproc-pericmd  view on Meta::CPAN


Default value:

 0

By default, when outputing as JSON, the full enveloped result is returned, e.g.:

    [200,"OK",[1,2,3],{"func.extra"=>4}]

The reason is so you can get the status (1st element), status message (2nd
element) as well as result metadata/extra result (4th element) instead of just
the result (3rd element). However, sometimes you want just the result, e.g. when
you want to pipe the result for more post-processing. In this case you can use
`--naked-res` so you just get:

    [1,2,3]


=back

=head2 Restart options

=over

=item B<--restart>

If set to true, do restart.

=back

=head2 Screensaver options

=over

=item B<--no-screensaver>

Prevent screensaver from being activated.

=back

=head2 Setuid options

=over

=item B<--egid>=I<s>

Set EGID(s) of command process.

Need to be root to be able to setuid.


=item B<--euid>=I<s>

Set EUID of command process.

Need to be root to be able to setuid.


=back

=head2 Timeout options

=over

=item B<--timeout>=I<s>

Apply execution time limit, in seconds.

After this time is reached, process (and all its descendants) are first sent the
TERM signal. If after 30 seconds pass some processes still survive, they are
sent the KILL signal.

The killing is implemented using <pm:IPC::Run>'s `kill_kill()`.

Upon timeout, exit code is set to 124.


=back

=head2 Other options

=over

=item B<--help>, B<-h>, B<-?>

Display help message and exit.

=item B<--version>, B<-v>

Display program's version and exit.

=back

=head1 COMPLETION

This script has shell tab completion capability with support for several
shells.

=head2 bash

To activate bash completion for this script, put:

 complete -C govproc-pericmd govproc-pericmd

in your bash startup (e.g. F<~/.bashrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.

It is recommended, however, that you install modules using L<cpanm-shcompgen>
which can activate shell completion for scripts immediately.

=head2 tcsh

To activate tcsh completion for this script, put:

 complete govproc-pericmd 'p/*/`govproc-pericmd`/'

in your tcsh startup (e.g. F<~/.tcshrc>). Your next shell session will then
recognize tab completion for the command. Or, you can also directly execute the
line above in your shell to activate immediately.

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.115 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )