ksh ulimit -v

Elan Ruusamäe glen at delfi.ee
Tue Mar 22 16:50:33 CET 2005


On Tuesday 22 March 2005 17:35, Elan Ruusamäe wrote:
> hi
>
> ksh lacks ulimit -v, altho manual of ksh sais it's there
> bash for example has it
>
> looked c_ulimit.c code from pdksh, and it builds -v support if RLIMIT_VMEM
> is defined.
>
> RLIMIT_ constants seem to came from /usr/include/bits/resource.h
> but RLIMIT_VMEM is not listed there.

related bugs

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=57931
looks like PLD tcsh is also affected
tcsh$ limit -v
limit: No such limit.

bash (from HEAD) seems to overcame the problem by following defines:
#ifdef RLIMIT_VMEM
#  define RLIMIT_VIRTMEMRLIMIT_VMEM
#  define RLIMIT_VMBLKSZ1024
#else
#  ifdef RLIMIT_AS
#    define RLIMIT_VIRTMEMRLIMIT_AS
#    define RLIMIT_VMBLKSZ1024
#  else
#    define RLIMIT_VIRTMEM259
#    define RLIMIT_VMBLKSZ1
#  endif
#endif


-- 
glen




More information about the pld-devel-en mailing list