RLIMIT_FSIZE
Maximum size of a file the process may create or extend.
- Resource number
- 1
- Row in /proc/PID/limits
- Max file size
- bash ulimit flag
- ulimit -f
- Unit in /proc/PID/limits
- bytes
- Group
- Files and descriptors
What happens at the limit
SIGXFSZ, which kills the process by default. If SIGXFSZ is ignored or caught, the write or truncate fails with EFBIG instead.
Error names: EFBIG.
It limits one file, not the total written. A job that "mysteriously dies mid-log" with exit status 153 on Linux (128 + 25) is this, usually inherited from a parent shell that someone once ran `ulimit -f` in.
Check a running process with grep -i "Max file size" /proc/PID/limits, or paste the whole file into the limits reader. Inspect or change one on a live process with prlimit --pid PID(util-linux).
Sources
Resource numbers are from asm-generic/resource.h; a few architectures (Alpha, MIPS, SPARC) number some limits differently. The list of syscall cards is matched by name from the card text on this site, not from the kernel source. Spot one that's wrong? Tell Rod.