chrt: default to SCHED_RR policy

This fixes a regression introduced in:

commit 7a4ea5664e
"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>
This commit is contained in:
Andreas Henriksson 2016-12-02 15:10:18 +01:00 committed by Karel Zak
parent 91f20582e7
commit c7adc2f204
1 changed files with 1 additions and 1 deletions

View File

@ -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[] = {