Re: [PATCH 4/4] chrt: do not try to interpret any other option as a PID either
Benno Schulenberg <[email protected]>
| Newsgroups | org.kernel.vger.util-linux |
|---|---|
| Message-ID | <[email protected]> |
Op 01-07-2025 om 07:21 schreef Madadi Vineeth Reddy: > On 30/06/25 14:10, Benno Schulenberg wrote: >> When doing, for example, `chrt --pid --max`, it would report: >> >> chrt: invalid PID argument: '--max' >> > > But --max is part of options right? > > According to help text, > chrt [options] --pid <priority> <pid> > > It should come before --pid right? Sure. But the synopses of a command often don't (or even cannot) fully express all possible arrangements of options and arguments. So the user ought to be forgiven (when possible) for trying some unspecified order. (When I forget the exact invocation of a tool, I normally tack a --help onto the previous attempt, and this usually prints the help text, ignoring any other options. It would be nice if that worked here too.) Also, the '--max' is obviously an option, why try to interpret it as a PID? Why make the tool obtuser than it needs to be? Benno
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmhj6AcFAwAAAAAACgkQUUu+Lrjhlh/r 0hAA1QVM4IMb6J8JFCMza4vQ1b84c0d7tUjXRyPLPCTOt0wpwnrgkA+EzAMsZxiAYRCATzhE7fQi BFTcbUa5RRLFrlX3wrwQgst7zJiR4ZMAwKzQKhV2Vtx02G4pxLzKdUBPvaGLKIK/FKzGXkOt0YZV X9EcIgFrQROPipLxA+pYhMw2serLLjOEpGOVr975QwIf0qXXiIE8drWW2qhnECYXNnOj2h7cIwsR B9t8pJ3ZKVQQtn/6X8HIVwiDZN5Rku74LntX8w6z3FcHYhC3oK/IXTzrI+sBj2zx9p78ZIUqyuN2 JFZT+TGPcf3QftHp+zktGQAbPUgC37TOjQVaOjYr7SSf6RLkdhmpWTAg+BCkqmn0eS9A+SKS1f8G ejn/fednsFc4sAe30wQJj9IIz04toKP9YNUVYH1C4VMszBT3OBy/6oe+f9oFD5aFu75x9h8QyxTQ umKBlAFP7qSK3cz2mOk5Rlxd9DhDMHux9Vpcm7+cspIremVDzeW5JjpdceJ4oZZcrXj3HkuNmN06 mhEnf7lA2sm0x60vpAzruC+O+VrsSge0cVqv7SxwKkP3eqLriexhrc800Hav1SrsdUpCke/oLQ4V +nC0NRt+ypwVJ9QnSvpVYVb4WgZX5hzkZlCXU5KN77SaEW3n5ECv8Ojb7RdCW8ZfjMqTk3Yxq560 T2c= =s/ls -----END PGP SIGNATURE-----