Util-Linux package development
 help / color / mirror / Atom feed
From: yumkam@gmail.com (Yuriy M. Kaminskiy)
To: util-linux@vger.kernel.org
Subject: Re: Separate taskset arguments from the command arguments
Date: Sun, 28 Feb 2016 01:52:20 +0300	[thread overview]
Message-ID: <m3egbxn4uz.fsf@gmail.com> (raw)
In-Reply-To: CAOaMnuGfN1hnEn7H95c2TzxyQUoQ3c5PzikApHMPyPW123R9fQ@mail.gmail.com

Akshay Adiga <akshay.adiga@gmail.com>
writes:

> I want to run a command which looks something like this :
>
> taskset -c 10 ycsb -p "redis_host=1234"
>
> The actual command is :
>
> ycsb -p "redis_host=1234"
>
> But argument -p "redis_host=1234" is taken by taskset as it argument
> and throws an error : Failed to set pid 0's affinity:
>
> -p "redis_host=1234" is an argument to ycsb command. shell/tasket
> misunderstands that and takes it as an argument for taskset.
>
> Is there a work around for this?

Normally, such problem are solved by inserting `--` before your command;
however, taskset have somewhat unusual parsing of arguments (-c is not
an "option with argument", but the flag), so it will be

  taskset -c -- 10 ycsb -p "redis_host=1234"


  reply	other threads:[~2016-02-27 22:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-27 18:46 Separate taskset arguments from the command arguments Akshay Adiga
2016-02-27 22:52 ` Yuriy M. Kaminskiy [this message]
2016-02-28  0:23   ` Yuriy M. Kaminskiy
2016-02-29  7:12     ` Akshay Adiga

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=m3egbxn4uz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox