From df8adcd7ba210291c01a6c59b00139fe1e1a1f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 11 Dec 2001 17:57:26 +0000 Subject: Ignore SIGXFSZ. Fixes #490453. --- Lib/test/test_largefile.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit v0.12