All of lore.kernel.org
 help / color / mirror / Atom feed
From: yumkam@gmail.com (Yuriy M. Kaminskiy)
To: util-linux@vger.kernel.org
Subject: [PATCH] taskset.1: fix description of `-c` option
Date: Sun, 28 Feb 2016 03:57:03 +0300	[thread overview]
Message-ID: <m360x9mz34.fsf@gmail.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/x-diff, Size: 1698 bytes --]

>From 7b9a194fd6d2d2d7d1bc39f28064dd2cb9340aad Mon Sep 17 00:00:00 2001
From: "Yuriy M. Kaminskiy" <yumkam@gmail.com>
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(-)

diff --git a/schedutils/taskset.1 b/schedutils/taskset.1
index 50cbe6b..901f9fa 100644
--- a/schedutils/taskset.1
+++ b/schedutils/taskset.1
@@ -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
-- 
2.1.4



                 reply	other threads:[~2016-02-28  0:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m360x9mz34.fsf@gmail.com \
    --to=yumkam@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.