aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2019-04-28 11:25:11 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-04-28 11:25:11 +0200
commit93f0b39a0712f3247349f1590757484ca18e725e (patch)
tree77702402cb3af3a2355f3fb390c4e13cefff8832 /shell
parent57e1b0ad5ebd77705841fbcd01a79f2552fbab8e (diff)
downloadbusybox-93f0b39a0712f3247349f1590757484ca18e725e.tar.gz
ash,hush: ulimit: add -i RLIMIT_SIGPENDING, -q RLIMIT_MSGQUEUE
function old new delta limits_tbl 104 120 +16 ulimit_opt_string 44 50 +6 limit_chars 14 16 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/0 up/down: 24/0) Total: 24 bytes text data bss dec hex filename 981996 485 7296 989777 f1a51 busybox_old 982065 485 7296 989846 f1a96 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/shell_common.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index cc518d54b..da3165329 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -344,6 +344,9 @@ static const struct limits limits_tbl[] = {
{ RLIMIT_NICE, 0, "scheduling priority" }, // -e
{ RLIMIT_FSIZE, 9, "file size (blocks)" }, // -f
#define LIMIT_F_IDX 3
+#ifdef RLIMIT_SIGPENDING
+ { RLIMIT_SIGPENDING, 0, "pending signals" }, // -i
+#endif
#ifdef RLIMIT_MEMLOCK
{ RLIMIT_MEMLOCK, 10, "max locked memory (kb)" }, // -l
#endif
@@ -353,6 +356,9 @@ static const struct limits limits_tbl[] = {
#ifdef RLIMIT_NOFILE
{ RLIMIT_NOFILE, 0, "open files" }, // -n
#endif
+#ifdef RLIMIT_MSGQUEUE
+ { RLIMIT_MSGQUEUE, 0, "POSIX message queues (bytes)" }, // -q
+#endif
#ifdef RLIMIT_RTPRIO
{ RLIMIT_RTPRIO, 0, "real-time priority" }, // -r
#endif
@@ -372,16 +378,17 @@ static const struct limits limits_tbl[] = {
{ RLIMIT_LOCKS, 0, "file locks" }, // -x
#endif
};
-// bash also has these:
-//pending signals (-i) 61858 //RLIMIT_SIGPENDING
+// bash also shows:
//pipe size (512 bytes, -p) 8
-//POSIX message queues (bytes, -q) 819200 //RLIMIT_MSGQUEUE
static const char limit_chars[] ALIGN1 =
"c"
"d"
"e"
"f"
+#ifdef RLIMIT_SIGPENDING
+ "i"
+#endif
#ifdef RLIMIT_MEMLOCK
"l"
#endif
@@ -391,6 +398,9 @@ static const char limit_chars[] ALIGN1 =
#ifdef RLIMIT_NOFILE
"n"
#endif
+#ifdef RLIMIT_MSGQUEUE
+ "q"
+#endif
#ifdef RLIMIT_RTPRIO
"r"
#endif
@@ -417,6 +427,9 @@ static const char ulimit_opt_string[] ALIGN1 = "-HSa"
"d::"
"e::"
"f::"
+#ifdef RLIMIT_SIGPENDING
+ "i::"
+#endif
#ifdef RLIMIT_MEMLOCK
"l::"
#endif
@@ -426,6 +439,9 @@ static const char ulimit_opt_string[] ALIGN1 = "-HSa"
#ifdef RLIMIT_NOFILE
"n::"
#endif
+#ifdef RLIMIT_MSGQUEUE
+ "q::"
+#endif
#ifdef RLIMIT_RTPRIO
"r::"
#endif