From: Thomas Weißschuh Date: Wed, 26 Jul 2023 14:33:09 +0000 (+0200) Subject: chrt: allow option separator X-Git-Tag: v2.40-rc1~320^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a85aad1219dadc9fc87e20ac105c917ffd9089c;p=thirdparty%2Futil-linux.git chrt: allow option separator Allow the option separator "--". It works in other, similar tools like nice and ionice. Example: chrt 1 -- id Signed-off-by: Thomas Weißschuh --- diff --git a/schedutils/chrt.c b/schedutils/chrt.c index 250d878063..eedb9d83bf 100644 --- a/schedutils/chrt.c +++ b/schedutils/chrt.c @@ -485,6 +485,8 @@ int main(int argc, char **argv) if (!ctl->pid) { argv += optind + 1; + if (strcmp(argv[0], "--") == 0) + argv++; execvp(argv[0], argv); errexec(argv[0]); }