Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Tcl panics when writing a file exceeding `ulimit -f`

Closed / Fixed3865631578e3423a7786527af579e844c6ace321Created 13 years agoUpdated 50 days ago
Descriptionplain2013-08-30 19:34:36
When writing a file that exceeds the size allowed by ulimit -f, Tcl panics (File size limit exceeded). This can easily be turned into a more reasonable I/O error (file too large). See the attached patch.
Referenced by4
  • 3b4c682f3bFix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGXFSZ check-in2026-10-13 15:12:48
  • ab4e320419Fix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGXFSZ check-in2026-10-13 15:09:59
  • 9a3e24fe8aFix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGXFSZ check-in2026-10-13 15:09:26
  • ef11c79e38Fix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGXFSZ. Ignore SIGXFSZ, as SIGPIPE, so that the write fails with an error (patch by sbron), and restore the default action in child processes. check-in2026-10-12 18:22:02
sbron Ticket [3865631578]: 3 changes [History diff]2013-08-30 19:42:42
serhiy.storchakawiki2026-10-12 18:22:58

Still happens in 8.6 and 9.x: the process is killed by SIGXFSZ.

Proposed fix in branch unix-ignore-sigxfsz: the attached patch, plus restoring the default action of SIGXFSZ in child processes, as for SIGPIPE, since ignored signals are inherited across exec(). Tests unixInit-1.3 and unixInit-1.4 check both.

jan.nijtmanswiki2026-10-14 07:39:36

Fixed in [trunk], backported to core-9-0-branch and core-8-6-branch. But without the testcase: It may work on Linux, but won't work on all possible platforms (it doesn't work on Cygwin).

Many thanks!

Log in (anonymous is fine) to add a comment.