Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2026-10-14
07:39 • Closed ticket [3865631578]: Tcl panics when writing a file exceeding `ulimit -f`... artifact: 66d780dc16 user: jan.nijtmans
2026-10-13
15:12
Fix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGX... check-in: 3b4c682f3b user: jan.nijtmans tags: core-8-6-branch
15:09
Fix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGX... check-in: ab4e320419 user: jan.nijtmans tags: core-9-0-branch
15:09
Fix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGX... check-in: 9a3e24fe8a user: jan.nijtmans tags: trunk, main
2026-10-12
18:22 • Ticket [3865631578] Tcl panics when writing a file exceeding `ulimit -f` sta... artifact: 421eb0a3ae user: serhiy.storchaka
18:22
Fix [3865631578]: writing a file beyond the file size limit (ulimit -f) killed the process with SIGX... closed check-in: ef11c79e38 user: serhiy.storchaka tags: unix-ignore-sigxfsz
2013-08-30
19:42 • Ticket [3865631578] Tcl panics when writing a file exceeding `ulimit -f` sta... artifact: bce7b17eb7 user: sbron
19:41 • Add attachment sigxfsz.patch to ticket [3865631578] artifact: 570b228ead user: sbron
19:34 • New ticket [3865631578] Tcl panics when writing a file exceeding `ulimit -f`... artifact: bb453919bb user: sbron

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.