]> git.ipfire.org Git - thirdparty/util-linux.git/commit
chrt: don't restrict --reset-on-fork, add more info to man page
authorKarel Zak <kzak@redhat.com>
Thu, 1 Oct 2020 09:20:01 +0000 (11:20 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Oct 2020 09:51:12 +0000 (11:51 +0200)
commit865f5f469c694a7edd740846c620e6fe75ec2ca1
tree98ded6942dceb6652dd613cb552ab7ea79bbfe82
parentfb4f1da4e040af3f5c8d1467e170894bc46ab324
chrt: don't restrict --reset-on-fork, add more info to man page

The flag works (= kernel accepts it) for all scheduling policies
and sched_getattr() returns the flag for all policies.

There is no reason for userspace to be more smart than kernel or hide
the flag when it prints sched_getattr()/sched_getscheduler() results.

 # chrt -v --reset-on-fork --batch 0 /bin/true
 pid 1315019's new scheduling policy: SCHED_BATCH|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --fifo 1 /bin/true
 pid 1315055's new scheduling policy: SCHED_FIFO|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --deadline --sched-period 10000 0 /bin/true
 pid 1315182's new scheduling policy: SCHED_DEADLINE|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --idle 0 /bin/true
 pid 1315247's new scheduling policy: SCHED_IDLE|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --rr 1 /bin/true
 pid 1315275's new scheduling policy: SCHED_RR|SCHED_RESET_ON_FORK

 # chrt -v --reset-on-fork --other 0 /bin/true
 pid 1315311's new scheduling policy: SCHED_OTHER|SCHED_RESET_ON_FORK

Signed-off-by: Karel Zak <kzak@redhat.com>
schedutils/chrt.1
schedutils/chrt.c