From 4a85aad1219dadc9fc87e20ac105c917ffd9089c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Wed, 26 Jul 2023 16:33:09 +0200 Subject: [PATCH] chrt: allow option separator MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Allow the option separator "--". It works in other, similar tools like nice and ionice. Example: chrt 1 -- id Signed-off-by: Thomas Weißschuh --- schedutils/chrt.c | 2 ++ 1 file changed, 2 insertions(+) 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]); } -- 2.47.2