New shell command: prlimit
Denys Vlasenko
vda.linux at googlemail.com
Thu May 23 13:14:13 UTC 2013
On Thu, May 23, 2013 at 4:53 AM, Joshua Judson Rosen
<jrosen at harvestai.com> wrote:
> The attached patch adds a new shell builtin, "prlimit", which is similar
> to ulimit but can operate on any process (not just the current process),
> by using Linux's prlimit() function.
>
> prlimit takes a PID as a first argument, and then processes the rest of
> its arguments identically to ulimit, e.g.:
>
> prlimit 3431 -c unlimited
>
> Maybe this is of general interest?
On, for example, Fedora, prlimit is an executable
(as opposed to shell built-in).
Therefore, it better be an applet in busybox, not built-in.
Another note:
+#if ENABLE_FEATURE_PRLIMIT
+ prlimit(pid, l->cmd, NULL, &limit);
+#else
getrlimit(l->cmd, &limit);
+#endif
What's the rationale behind this change?
More information about the busybox
mailing list