Message ID | 56938FD6.3010600@svario.it (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Gioele Barabucci <gioele@svario.it> writes: > Document that `ulimit` can set the `RLIMIT_AS` limit (virtual memory) with > the `-v` flag. I don't know much about RLIMIT_AS, but I know that it isn't supported on all systems where dash runs, eg OpenBSD. Maybe is it Linux-specific? Anyway, it would be better if the manpage said that the -v flag may not be implemented on all platforms. The same could be said about ulimit -w. (I did not check the other flags). > Fixes: https://bugs.debian.org/78556 > Reported-by: Vincent Lefevre <vincent@vinc17.net> > Signed-off-by: Gioele Barabucci <gioele@svario.it> > --- > src/dash.1 | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/src/dash.1 b/src/dash.1 > index 832eae7..8b8026d 100644 > --- a/src/dash.1 > +++ b/src/dash.1 > @@ -2114,7 +2114,7 @@ printed; for commands and tracked aliases the complete pathname of the > command is printed. > .It ulimit Xo > .Op Fl H \*(Ba Fl S > -.Op Fl a \*(Ba Fl tfdscmlpn Op Ar value > +.Op Fl a \*(Ba Fl tfdscmlpnv Op Ar value > .Xc > Inquire about or set the hard or soft limits on processes or set new > limits. > @@ -2164,6 +2164,9 @@ show or set the limit on the number of processes this user can > have at one time > .It Fl n > show or set the limit on the number files a process can have open at once > +.It Fl v > +show or set the limit on the total virtual memory that can be > +in use by a process (in kilobytes) > .It Fl r > show or set the limit on the real-time scheduling priority of a process > .El
Jérémie Courrèges-Anglas <jca@wxcvbn.org> wrote: > Gioele Barabucci <gioele@svario.it> writes: > >> Document that `ulimit` can set the `RLIMIT_AS` limit (virtual memory) with >> the `-v` flag. > > I don't know much about RLIMIT_AS, but I know that it isn't supported on > all systems where dash runs, eg OpenBSD. Maybe is it Linux-specific? > > Anyway, it would be better if the manpage said that the -v flag may not > be implemented on all platforms. > > The same could be said about ulimit -w. (I did not check the other flags). Rather than doing that we could just pass the manpage through cpp or some similar mechanism so that this becomes conditional. Cheers,
On 21/01/2016 06:03, Herbert Xu wrote: > Jérémie Courrèges-Anglas <jca@wxcvbn.org> wrote: >> Gioele Barabucci <gioele@svario.it> writes: >> >>> Document that `ulimit` can set the `RLIMIT_AS` limit (virtual memory) with >>> the `-v` flag. >> >> I don't know much about RLIMIT_AS, but I know that it isn't supported on >> all systems where dash runs, eg OpenBSD. Maybe is it Linux-specific? >> >> Anyway, it would be better if the manpage said that the -v flag may not >> be implemented on all platforms. >> >> The same could be said about ulimit -w. (I did not check the other flags). > > Rather than doing that we could just pass the manpage through > cpp or some similar mechanism so that this becomes conditional. I wonder how much it is worth the effort in this case. RLIMIT_AS is defined by POSIX [1] since 1997 [2], so one can suppose that it is available anywhere (indeed the man page of OpenBSD refers to the missing RLIMIT_AS as a bug). If it is not available, an invocation of `ulimit -v` will complain about the unknown option. We could just add to the description "(not available on systems that lack support for RLIMIT_AS, e.g. OpenBSD)". Other cases like `-w` can be ignored: they manipulate non-standard RLIMIT extensions that are no-ops on Linux since long ago (and I suppose also in other systems). Regards, [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/setrlimit.html [2] http://pubs.opengroup.org/onlinepubs/7908799/xsh/sysresource.h.html -- Gioele Barabucci <gioele@svario.it> -- To unsubscribe from this list: send the line "unsubscribe dash" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Jan 11, 2016 at 08:12:35PM +0100, Gioele Barabucci wrote: > Document that `ulimit` can set the `RLIMIT_AS` limit (virtual memory) with > the `-v` flag. > > Fixes: https://bugs.debian.org/78556 > Reported-by: Vincent Lefevre <vincent@vinc17.net> > Signed-off-by: Gioele Barabucci <gioele@svario.it> Patch applied. Thanks.
diff --git a/src/dash.1 b/src/dash.1 index 832eae7..8b8026d 100644 --- a/src/dash.1 +++ b/src/dash.1 @@ -2114,7 +2114,7 @@ printed; for commands and tracked aliases the complete pathname of the command is printed. .It ulimit Xo .Op Fl H \*(Ba Fl S -.Op Fl a \*(Ba Fl tfdscmlpn Op Ar value +.Op Fl a \*(Ba Fl tfdscmlpnv Op Ar value .Xc Inquire about or set the hard or soft limits on processes or set new limits. @@ -2164,6 +2164,9 @@ show or set the limit on the number of processes this user can have at one time .It Fl n show or set the limit on the number files a process can have open at once +.It Fl v +show or set the limit on the total virtual memory that can be +in use by a process (in kilobytes) .It Fl r show or set the limit on the real-time scheduling priority of a process .El
Document that `ulimit` can set the `RLIMIT_AS` limit (virtual memory) with the `-v` flag. Fixes: https://bugs.debian.org/78556 Reported-by: Vincent Lefevre <vincent@vinc17.net> Signed-off-by: Gioele Barabucci <gioele@svario.it> --- src/dash.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)