Re: [PATCH 2/4] chrt: do not try to interpret the --pid option itself as a PID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello Vineeth,

Op 01-07-2025 om 07:05 schreef Madadi Vineeth Reddy:
On 30/06/25 14:10, Benno Schulenberg wrote:
When not specifying a PID with --pid, `chrt` would report:

   chrt: invalid PID argument: '--pid'

That was silly.  After this change, `chrt --pid` will report:

   chrt: too few arguments

IMO, the current message is already helpful, and I'm not sure
the proposed one is much clearer.

Maybe something like --pid requires an argument would be clearer?

There's no need for that, because when the user specified -p or --pid
without any further argument, then saying "too few arguments" will be
enough.  No need to spell it out.  The advantage of this short message
is that it allows folding the messages for "too few arguments" into a
single one in the overnext commit.  Furthermore, the message is already
used in a few other util-linux tools, so it won't burden translators.

Also, I noticed that currently more than one pid can't be passed
if someone wants to update the custom slice for multiple pids at
once. I can look into adding support for that if it's helpful.

I don't think that is a good idea: the current interface is already
confusing in that _gets_ info when a single argument follows --pid,
and that it _sets_ something when there a two arguments.  Allowing
to set something for multiple PIDs at once while it's not possible
to query multiple PIDs at once... is more confusing.


Benno

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux