mirror of
https://github.com/python/cpython.git
synced 2025-12-03 16:19:41 +00:00
Ignore SIGXFSZ. Fixes #490453.
This commit is contained in:
parent
1d3e6c15ce
commit
df8adcd7ba
1 changed files with 9 additions and 0 deletions
|
|
@ -8,6 +8,15 @@
|
||||||
import test_support
|
import test_support
|
||||||
import os, struct, stat, sys
|
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)
|
# create >2GB file (2GB = 2147483648 bytes)
|
||||||
size = 2500000000L
|
size = 2500000000L
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue