App-RunStopRun

 view release on metacpan or  search on metacpan

bin/run-stop-run  view on Meta::CPAN


=item B<-G>, B<--no-group>, B<--nogroup>

Don't create a new process group for the command to run. When operating on
a list of PIDs, it will not determine associated process groups and operate on
them, but it will still operate on any given PGIDs.

Note that creating a new process group causes the command to be run in the
background, and some commands refuse to print if they are not the foreground
process (ex. newer versions of B<pv>). In this case, you will also have to
disable pseudo-terminal allocation, as that results in a call to C<setsid()>,
which creates a new process group.

=item B<-c>, B<--children>

Operate on all descendent processes of the command or PIDs. These are found by
scanning the process table and checking the parent process and group of each
process. Note that it's not always possible to determine the parentage, since
the process might have double-forked and changed it's process group.

=item B<-T>, B<--no-tty>, B<--notty>

Disable pseudo-terminal allocation.

=item B<-t>, B<--tty>

Force pseudo-terminal allocation. Specifying this more than once will force
allocation even if there is no attached terminal.

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

Display the version.

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

Display the help message.

=item B<-H>, B<--man>

Display this documentation.

=back

=head1 KNOWN PROBLEMS

Operating on a PID of a foreground process will likely result in job control
messages from the shell indicating the job was stopped when it receives the
SIGSTOP signal. Note that the job will be continued in the background after
receiving the SIGCONT signal, but no shell messages will be displayed.

It is not always possible to determine if a process is a child process. In
that case, you can run the command separately and then run this program
against a list of PIDs.

=head1 SEE ALSO

L<https://github.com/opsengine/cpulimit>

L<https://en.wikipedia.org/wiki/Cgroups>

L<https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html>

L<bash(1)/ulimit>

L<nice(1)>, L<renice(8)>

=head1 COPYRIGHT AND LICENSE

Copyright (c) 2022 gray <gray at cpan.org>

This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.

=head1 AUTHOR

gray, <gray at cpan.org>

=cut



( run in 0.992 second using v1.01-cache-2.11-cpan-df04353d9ac )