]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
chrt: (man,usage) put --pid first in synopses and examples, for clarity
authorBenno Schulenberg <bensberg@telfort.nl>
Tue, 5 Aug 2025 09:24:43 +0000 (11:24 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 7 Aug 2025 09:20:35 +0000 (11:20 +0200)
When --pid is among the options, it is clearest when it is given as the
first option, because then it doesn't sit between the policy option and
the somewhat related priority value.  It creates some kind of symmetry:
the --pid option first, then other things, and the actual PID last.

CC: Madadi Vineeth Reddy <vineethr@linux.ibm.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
schedutils/chrt.1.adoc
schedutils/chrt.c

index 7ed676a9ab7a2fb2e1038db7d050027ec7572ed8..7805ec6d2e04c4317d86b1676eda440a311e4561 100644 (file)
@@ -40,13 +40,13 @@ chrt - manipulate the real-time attributes of a process
 
 *chrt* [options] [_priority_] _command_ [_argument_...]
 
-*chrt* [options] *--pid* [_priority_] _PID_
+*chrt --pid* [options] [_priority_] _PID_
 
 == DESCRIPTION
 
 *chrt* sets or retrieves the real-time scheduling attributes of an existing _PID_, or runs _command_ with the given attributes.
 
-== POLICIES
+== POLICY OPTIONS
 
 *-o*, *--other*::
 Set scheduling policy to *SCHED_OTHER* (time-sharing scheduling). This is the default Linux scheduling policy. Since util-linux v2.42, the priority argument is optional; if specified, it must be set to zero.
@@ -122,19 +122,19 @@ ____
 //TRANSLATORS: Keep {colon} untranslated
 Or set them{colon}::
 ____
-*chrt* _policy-option_ *--pid* _priority PID_
+*chrt --pid* _policy-option priority PID_
 ____
 For example, to set the scheduling policy to *SCHED_RR* (round-robin) and the priority to *30* for process *1234*{colon}::
 ____
-*chrt -r --pid 30 1234*
+*chrt --pid -r 30 1234*
 ____
 Reset priorities to default for a process{colon}::
 ____
-*chrt -o --pid 0* _PID_
+*chrt --pid -o 0* _PID_
 ____
 Set a custom slice of 1 ms for a *SCHED_OTHER* task (priority is optional for policies other than *SCHED_FIFO* and *SCHED_RR*){colon}::
 ____
-*chrt -o -T 1000000 --pid* _PID_
+*chrt --pid -o -T 1000000* _PID_
 ____
 See *sched*(7) for a detailed discussion of the different scheduler classes and how they interact.
 
index de1898160b9fedaaa110b360f02b9f9067046c9e..b5ddc53bdecb7141a9ef41cd4dc78e5a037fb988 100644 (file)
@@ -61,7 +61,7 @@ static void __attribute__((__noreturn__)) usage(void)
        fputs(USAGE_SEPARATOR, out);
        fputs(_("Set policy:\n"
                " chrt [options] [<priority>] <command> [<argument>...]\n"
-               " chrt [options] --pid [<priority>] <PID>\n"), out);
+               " chrt --pid <policy-option> [options] [<priority>] <PID>\n"), out);
        fputs(USAGE_SEPARATOR, out);
        fputs(_("Get policy:\n"
                " chrt --pid <PID>\n"), out);