Re: [PATCH 3/4 V2] chrt: simplify the other check for too few arguments

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

 




Op 06-07-2025 om 07:58 schreef Madadi Vineeth Reddy:
But priority should also be optional when --pid is not used, for
policies that don’t require it.

Oh...  Then the synopses need adjusting, because currently they
indicate the priority value as mandatory when a command is given:

  chrt [options] priority command [argument...]


With your patch, this fails:
chrt --other ls
chrt: too few arguments
Try 'chrt --help' for more information.

while this works:
chrt --other 0 ls

The first case should work too, to match the behavior introduced in
commit e7a2d62434c2 ("chrt: Make priority optional for policies that don't use it").

With current git (or after checking out that commit), and then running
`./chrt --other ls`, it says here:

  Segmentatiefout (geheugendump gemaakt)

Running valgrind on it gives:

  ==38370== Invalid read of size 1
  ==38370==    by 0x10C6EB: main (chrt.c:574)

Pointing to: if (strcmp(argv[0], "--") == 0)


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