summaryrefslogtreecommitdiffstats
path: root/schedutils
diff options
context:
space:
mode:
authorAndreas Henriksson2016-12-02 15:10:18 +0100
committerKarel Zak2016-12-05 13:07:50 +0100
commitc7adc2f204f19167f781fa2ee739e0ca386fc4f5 (patch)
tree01a8968bb5b7014ae1562519c169007b1dec5f3f /schedutils
parentdocs: nsenter(1): add missing 'see also' for --user (diff)
downloadkernel-qcow2-util-linux-c7adc2f204f19167f781fa2ee739e0ca386fc4f5.tar.gz
kernel-qcow2-util-linux-c7adc2f204f19167f781fa2ee739e0ca386fc4f5.tar.xz
kernel-qcow2-util-linux-c7adc2f204f19167f781fa2ee739e0ca386fc4f5.zip
chrt: default to SCHED_RR policy
This fixes a regression introduced in: commit 7a4ea5664edba98bff28adec3a9c3cfb5763a495 "chrt: add control struct" Previously (and as documented in the manpage) the default policy was SCHED_RR. Now it's implicitly SCHED_OTHER (0) as the value is not initialized explicitly anymore. Test-command: chrt 90 echo hello Reported-by: Patrick Pelissier <patrick.pelissier@gmail.com> Addresses: http://bugs.debian.org/846572 Signed-off-by: Andreas Henriksson <andreas@fatal.se>
Diffstat (limited to 'schedutils')
-rw-r--r--schedutils/chrt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index a861d9f75..73d1ffa9b 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -409,7 +409,7 @@ static void set_sched(struct chrt_ctl *ctl)
int main(int argc, char **argv)
{
- struct chrt_ctl _ctl = { .pid = -1 }, *ctl = &_ctl;
+ struct chrt_ctl _ctl = { .pid = -1, .policy = SCHED_RR }, *ctl = &_ctl;
int c;
static const struct option longopts[] = {