Learn R Programming

RAppArmor (version 0.8.1)

rlimit_fsize: Limit size of files

Description

The maximum size of files that the process may create.

Usage

rlimit_fsize(hardlim, softlim = hardlim, pid = 0,
    verbose = FALSE)

Arguments

hardlim
size
softlim
size
pid
id of the target process
verbose
print some C output (TRUE/FALSE)

Details

The maximum size of files that the process may create. Attempts to extend a file beyond this limit result in delivery of a SIGXFSZ signal. By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., write(2), truncate(2)) fails with the error EFBIG.

References

http://manpages.ubuntu.com/manpages/precise/man2/getrlimit.2.html

See Also

Other rlimit: rlimit_as, rlimit_core, rlimit_cpu, rlimit_data, rlimit_memlock, rlimit_msgqueue, rlimit_nice, rlimit_nofile, rlimit_nproc, rlimit_rtprio, rlimit_rttime, rlimit_sigpending, rlimit_stack

Examples

Run this code
#load lib
library(RAppArmor)

#current limit
rlimit_as();

#set hard limit
rlimit_as(1e9);

#set separate hard and soft limit. 
rlimit_as(1e9, 1e8);

#soft limits can be elevated
rlimit_as(soft = 1e7);
rlimit_as(soft = 1e9);

#set other limits
rlimit_core(1e9);
rlimit_data(1e9);
rlimit_fsize(1e9);
rlimit_memlock(10000);
rlimit_msgqueue(1e5);
rlimit_nofile(10);
rlimit_nproc(100);
rlimit_rttime(1e9);
rlimit_sigpending(1e4);
rlimit_stack(1000);
rlimit_cpu(10);

Run the code above in your browser using DataLab