tags: egg

rlimit

Setting resource limits

  1. rlimit
    1. rlimit
    2. rlimit/RESOURCE
  2. Version history
  3. License

rlimit

[procedure] (rlimit RESOURCE [HARD?]) -> number

Returns the current limit for the RESOURCE, which should be one of the resource-identifiers listed below. By default the soft limit is returned, but if HARD? is given and true, the current hard limit is returned. See the getrlimit(2) man page for more information.

Note that if no limit is set, +inf.0 will be returned.

[procedure] (set! (rlimit RESOURCE [HARD?]) VALUE)

Sets the soft or hard limit for the RESOURCE. A VALUE of +inf.0 disables the limit completely. A VALUE of #f is equivalent to zero.

rlimit/RESOURCE

Here is a list of available resources. Some resource types mot be available on every platform.

[constant] rlimit/as
[constant] rlimit/core
[constant] rlimit/cpu
[constant] rlimit/data
[constant] rlimit/fsize
[constant] rlimit/locks
[constant] rlimit/memlock
[constant] rlimit/msgqueue
[constant] rlimit/nice
[constant] rlimit/nofile
[constant] rlimit/nproc
[constant] rlimit/ofile
[constant] rlimit/rss
[constant] rlimit/rtprio
[constant] rlimit/rttime
[constant] rlimit/sigpending
[constant] rlimit/stack
[constant] rlimit/vmem

Version history

1.0.0
CHICKEN 5 release.

License

Copyright (c) 2006, Felix L. Winkelmann. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ASIS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.")