Skip to contentSkip to conversation

taskset.1: fix description of `-c` option

PATCH New Yuriy M. Kaminskiy 1 participant 1 message Feb 28, 2016 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 taskset.1: fix description of `-c` option

Quoted 1 line

From 7b9a194fd6d2d2d7d1bc39f28064dd2cb9340aad Mon Sep 17 00:00:00 2001

From: "Yuriy M. Kaminskiy" <[email protected]>
Date: Sun, 28 Feb 2016 03:34:13 +0300
Subject: [PATCH] taskset.1: fix description of -c option

Commit 42f15e9848dc07e86a2b80c742a0179aaced6c71 introduced a certain
inaccuracy in -c option description; it is not _the option with an argument_,
but it is the flag that changes interpretation of mask parameter.
The difference is almost not noticeable, but there are one corner case where it is:
taskset -c 1 -p $$
fails (but it would work if 42f15e was correct). Instead,
taskset -c -p 1 $$
works (but it should not have if 42f15e was correct).
---
P.S. argument parsing in taskset (and chrt) is rather unusual and confusing, and I'd voted to change it instead... unfortunately, people/scripts/... already depend on current behavior (and it is not outright broken, just unusual), so it is impossible.

 schedutils/taskset.1 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
schedutils/taskset.1 +3 -3
index 50cbe6b..901f9fa 100644
@@ -73,9 +73,9 @@ CPU.
 .BR \-a ,\  \-\-all\-tasks
 Set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
 .TP
-.BR \-c ,\  \-\-cpu\-list \ \fInumbers
-Specify a numerical list of processors instead of a bitmask.  The \fInumbers\fR
-are separated by commas and may include ranges.  For example:
+.BR \-c ,\  \-\-cpu\-list
+Interpret \fImask\fR as numerical list of processors instead of a bitmask.
+Numbers are separated by commas and may include ranges.  For example:
 .BR 0,5,8-11 .
 .TP
 .BR \-p ,\  \-\-pid
Signature · 1 line
2.1.4