dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] man: Document ulimit -v
@ 2016-01-11 19:12 Gioele Barabucci
  2016-01-20 18:02 ` Jérémie Courrèges-Anglas
  2016-06-06 14:45 ` Herbert Xu
  0 siblings, 2 replies; 5+ messages in thread
From: Gioele Barabucci @ 2016-01-11 19:12 UTC (permalink / raw)
  To: dash

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(-)

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
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] man: Document ulimit -v
  2016-01-11 19:12 [PATCH] man: Document ulimit -v Gioele Barabucci
@ 2016-01-20 18:02 ` Jérémie Courrèges-Anglas
  2016-01-21  5:03   ` Herbert Xu
  2016-06-06 14:45 ` Herbert Xu
  1 sibling, 1 reply; 5+ messages in thread
From: Jérémie Courrèges-Anglas @ 2016-01-20 18:02 UTC (permalink / raw)
  To: Gioele Barabucci; +Cc: dash

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

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] man: Document ulimit -v
  2016-01-20 18:02 ` Jérémie Courrèges-Anglas
@ 2016-01-21  5:03   ` Herbert Xu
  2016-01-21  7:25     ` Gioele Barabucci
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2016-01-21  5:03 UTC (permalink / raw)
  To: Jérémie Courrèges-Anglas; +Cc: gioele, dash

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,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] man: Document ulimit -v
  2016-01-21  5:03   ` Herbert Xu
@ 2016-01-21  7:25     ` Gioele Barabucci
  0 siblings, 0 replies; 5+ messages in thread
From: Gioele Barabucci @ 2016-01-21  7:25 UTC (permalink / raw)
  To: dash

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>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: man: Document ulimit -v
  2016-01-11 19:12 [PATCH] man: Document ulimit -v Gioele Barabucci
  2016-01-20 18:02 ` Jérémie Courrèges-Anglas
@ 2016-06-06 14:45 ` Herbert Xu
  1 sibling, 0 replies; 5+ messages in thread
From: Herbert Xu @ 2016-06-06 14:45 UTC (permalink / raw)
  To: Gioele Barabucci; +Cc: dash

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.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-06 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-11 19:12 [PATCH] man: Document ulimit -v Gioele Barabucci
2016-01-20 18:02 ` Jérémie Courrèges-Anglas
2016-01-21  5:03   ` Herbert Xu
2016-01-21  7:25     ` Gioele Barabucci
2016-06-06 14:45 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).