aboutsummaryrefslogtreecommitdiff
path: root/miscutils/chrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/chrt.c')
-rw-r--r--miscutils/chrt.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/miscutils/chrt.c b/miscutils/chrt.c
index 1c6737a3c..7e40b9f13 100644
--- a/miscutils/chrt.c
+++ b/miscutils/chrt.c
@@ -5,6 +5,23 @@
5 * 5 *
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8
9//usage:#define chrt_trivial_usage
10//usage: "[-prfom] [PRIO] [PID | PROG ARGS]"
11//usage:#define chrt_full_usage "\n\n"
12//usage: "Change scheduling priority and class for a process\n"
13//usage: "\nOptions:"
14//usage: "\n -p Operate on PID"
15//usage: "\n -r Set SCHED_RR class"
16//usage: "\n -f Set SCHED_FIFO class"
17//usage: "\n -o Set SCHED_OTHER class"
18//usage: "\n -m Show min/max priorities"
19//usage:
20//usage:#define chrt_example_usage
21//usage: "$ chrt -r 4 sleep 900; x=$!\n"
22//usage: "$ chrt -f -p 3 $x\n"
23//usage: "You need CAP_SYS_NICE privileges to set scheduling attributes of a process"
24
8#include <sched.h> 25#include <sched.h>
9#include "libbb.h" 26#include "libbb.h"
10#ifndef _POSIX_PRIORITY_SCHEDULING 27#ifndef _POSIX_PRIORITY_SCHEDULING