diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Builtins/rlimits.awk | 1 | ||||
-rw-r--r-- | Src/Builtins/rlimits.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk index 418206a66..bf914814d 100644 --- a/Src/Builtins/rlimits.awk +++ b/Src/Builtins/rlimits.awk @@ -42,6 +42,7 @@ BEGIN {limidx = 0} if (limnam == "MEMLOCK") { msg[limnum] = "Mmemorylocked" } if (limnam == "NOFILE") { msg[limnum] = "Ndescriptors" } if (limnam == "NPROC") { msg[limnum] = "Nmaxproc" } + if (limnam == "NTHR") { msg[limnum] = "Nmaxthr" } if (limnam == "OFILE") { msg[limnum] = "Ndescriptors" } if (limnam == "PTHREAD") { msg[limnum] = "Nmaxpthreads" } if (limnam == "RSS") { msg[limnum] = "Mresident" } diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c index 670516169..45d5b2dea 100644 --- a/Src/Builtins/rlimits.c +++ b/Src/Builtins/rlimits.c @@ -314,6 +314,12 @@ printulimit(char *nam, int lim, int hard, int head) printf("-u: processes "); break; # endif /* HAVE_RLIMIT_NPROC */ +# ifdef HAVE_RLIMIT_NTHR + case RLIMIT_NTHR: + if (head) + printf("-r: threads "); + break; +#endif /* HAVE_RLIMIT_NTHR */ # if defined(HAVE_RLIMIT_VMEM) && (!defined(HAVE_RLIMIT_RSS) || !defined(RLIMIT_VMEM_IS_RSS)) case RLIMIT_VMEM: if (head) @@ -791,6 +797,11 @@ bin_ulimit(char *name, char **argv, UNUSED(Options ops), UNUSED(int func)) res = RLIMIT_NOFILE; break; # endif /* HAVE_RLIMIT_NOFILE */ +# ifdef HAVE_RLIMIT_NTHR + case 'r': + res = RLIMIT_NTHR; + break; +# endif /* HAVE_RLIMIT_NTHR */ # ifdef HAVE_RLIMIT_NPROC case 'u': res = RLIMIT_NPROC; |