summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-12-11 17:57:26 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-12-11 17:57:26 (GMT)
commitdf8adcd7ba210291c01a6c59b00139fe1e1a1f48 (patch)
tree7038d384c12822aae7bcbddd383b62d4d82bf1a9 /Lib
parent1d3e6c15ced88e01a1bd3b8b6b48278a6162f539 (diff)
downloadcpython-df8adcd7ba210291c01a6c59b00139fe1e1a1f48.zip
cpython-df8adcd7ba210291c01a6c59b00139fe1e1a1f48.tar.gz
cpython-df8adcd7ba210291c01a6c59b00139fe1e1a1f48.tar.bz2
Ignore SIGXFSZ. Fixes #490453.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_largefile.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py
index 352fae0..abfee39 100644
--- a/Lib/test/test_largefile.py
+++ b/Lib/test/test_largefile.py
@@ -8,6 +8,15 @@
import test_support
import os, struct, stat, sys
+try:
+ import signal
+ # The default handler for SIGXFSZ is to abort the process.
+ # By ignoring it, system calls exceeding the file size resource
+ # limit will raise IOError instead of crashing the interpreter.
+ oldhandler = signal.signal(signal.SIGXFSZ, signal.SIG_IGN)
+except (ImportError, AttributeError):
+ pass
+
# create >2GB file (2GB = 2147483648 bytes)
size = 2500000000L