.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" @(#)renice.8 8.1 (Berkeley) 6/9/93
+.\" @(#)renice.8 8.1 (Berkeley) 6/9/93
.\"
.Dd June 9, 1993
.Dt RENICE 1
.Nd alter priority of running processes
.Sh SYNOPSIS
.Nm renice
+.Op Fl n
.Ar priority
.Oo
.Op Fl p
Options supported by
.Nm renice :
.Bl -tag -width Ds
+.It Fl n, Fl Fl priority
+The scheduling
+.Ar priority
+of the process, process group, or user.
.It Fl g, Fl Fl pgrp
Force
.Ar who
void usage(int rc)
{
printf( _("\nUsage:\n"
- " renice priority [-p|--pid] pid [... pid]\n"
- " renice priority -g|--pgrp pgrp [... pgrp]\n"
- " renice priority -u|--user user [... user]\n"
+ " renice [-n] priority [-p|--pid] pid [... pid]\n"
+ " renice [-n] priority -g|--pgrp pgrp [... pgrp]\n"
+ " renice [-n] priority -u|--user user [... user]\n"
" renice -h | --help\n"
" renice -v | --version\n\n"));
exit(rc);
}
+
/*
* Change the priority (nice) of processes
* or groups of processes which are already
if (argc < 2)
usage(EXIT_FAILURE);
+ if (strcmp(*argv, "-n") == 0 || strcmp(*argv, "--priority") == 0) {
+ argc--;
+ argv++;
+ }
+
prio = strtol(*argv, &endptr, 10);
if (*endptr)
usage(EXIT_FAILURE);