From 030d18fd2a75784359a970d0560446952575f024 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sat, 6 Sep 2008 14:54:01 +0200 Subject: ionice: add strtol() checks, cleanup usage text and man page * cleanup usage() output * check strtol(); don't ignore wrong command line options The original ionice design was a little broken, because it was possible to specify a PID and also a COMMAND: ionice -c2 -p 123 /bin/foo but the command /bin/foo was executed without requested scheduling class. That's stupid behaviour. Now you have to use "-p PID" **or** COMMAND, but not both. Nothing is ignored and all options are checked. Signed-off-by: Karel Zak --- schedutils/ionice.1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'schedutils/ionice.1') diff --git a/schedutils/ionice.1 b/schedutils/ionice.1 index 67fbc1d04..2eca2b8b1 100644 --- a/schedutils/ionice.1 +++ b/schedutils/ionice.1 @@ -2,7 +2,9 @@ .SH NAME ionice \- get/set program io scheduling class and priority .SH SYNOPSIS -.BI "ionice [\-p " pid "] [\-c " class "] [\-n " classdata " ] [\-t] [COMMAND [ARG ...]]" +.BI "ionice [[\-c " class "] [\-n " classdata " ] [\-t]] \-p " PID " [" PID " ...]" + +.BI "ionice [\-c " class "] [\-n " classdata " ] [\-t] COMMAND [ARG ...]" .SH DESCRIPTION This program sets or gets the io scheduling class and priority for a program. @@ -41,11 +43,11 @@ The scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, \fI0-7\fR is valid data. .IP "\fB-p \fIpid\fP" -Pass in process PIDs to view or change already running processes. If this argument +Pass in process PID(s) to view or change already running processes. If this argument is not given, \fBionice\fP will run the listed program with the given parameters. .IP "\fB-t\fP" -Ignore failure to set requested priority. If COMMAND is specified, run it +Ignore failure to set requested priority. If COMMAND or PID(s) is specified, run it even in case it was not possible to set desired scheduling priority, what can happen due to insufficient privilegies or old kernel version. -- cgit v1.2.3-55-g7522