aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/busybox.c6
-rw-r--r--applets/usage.c12
2 files changed, 17 insertions, 1 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 0c291d0c5..5b19e8a16 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -250,6 +250,9 @@ const struct BB_applet applets[] = {
#ifdef BB_REBOOT
{"reboot", reboot_main, _BB_DIR_SBIN, reboot_usage},
#endif
+#ifdef BB_RENICE
+ {"renice", renice_main, _BB_DIR_USR_BIN},
+#endif
#ifdef BB_RM
{"rm", rm_main, _BB_DIR_BIN, rm_usage},
#endif
@@ -484,8 +487,9 @@ int main(int argc, char **argv)
#ifdef BB_SH
/* Add in a special case hack -- whenever **argv == '-'
* (i.e. '-su' or '-sh') always invoke the shell */
- if (**argv == '-')
+ if (**argv == '-' && *(*argv+1)!= '-') {
exit(((*(shell_main)) (argc, argv)));
+ }
#endif
while (a->name != 0) {
diff --git a/applets/usage.c b/applets/usage.c
index 1031f24bc..3f367f9b1 100644
--- a/applets/usage.c
+++ b/applets/usage.c
@@ -859,6 +859,18 @@ const char reboot_usage[] =
;
#endif
+
+#if defined BB_RENICE
+const char renice_usage[] =
+ "renice priority pid [pid ...]\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "\nChanges priority of running processes. Allowed priorities range\n"
+ "from 20 (the process runs only when nothing else is running) to 0\n"
+ "(default priority) to -20 (almost nothing else ever gets to run).\n"
+#endif
+ ;
+#endif
+
#if defined BB_RM
const char rm_usage[] =
"rm [OPTION]... FILE...\n"