[pypy-svn] r34930 - pypy/dist/pypy/translator/goal

fijal at codespeak.net fijal at codespeak.net
Fri Nov 24 12:33:59 CET 2006


Author: fijal
Date: Fri Nov 24 12:33:47 2006
New Revision: 34930

Modified:
   pypy/dist/pypy/translator/goal/app_main.py
Log:
(mwh, fijal) - added ignoring of sigpipe. Otherwise program got killed by it.


Modified: pypy/dist/pypy/translator/goal/app_main.py
==============================================================================
--- pypy/dist/pypy/translator/goal/app_main.py	(original)
+++ pypy/dist/pypy/translator/goal/app_main.py	Fri Nov 24 12:33:47 2006
@@ -15,6 +15,13 @@
 
 originalexcepthook = sys.__excepthook__
 
+try:
+    from signal import signal, SIG_IGN, SIGPIPE
+    signal(SIGPIPE, SIG_IGN)
+except ImportError:
+    # XXX: we should do it on c-level anyway
+    pass
+
 def run_toplevel(f, *fargs, **fkwds):
     """Calls f() and handle all OperationErrors.
     Intended use is to run the main program or one interactive statement.



More information about the Pypy-commit mailing list