You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by aj...@apache.org on 2004/03/25 16:16:07 UTC
cvs commit: gump/python/gump integrate.py
ajack 2004/03/25 07:16:07
Modified: python/gump integrate.py
Log:
Try to avoid death by hangup (catch SIGHUP).
Revision Changes Path
1.25 +12 -0 gump/python/gump/integrate.py
Index: integrate.py
===================================================================
RCS file: /home/cvs/gump/python/gump/integrate.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- integrate.py 16 Mar 2004 19:50:14 -0000 1.24
+++ integrate.py 25 Mar 2004 15:16:07 -0000 1.25
@@ -43,6 +43,9 @@
# Functions
###############################################################################
+def ignoreHangup(signum):
+ pass
+
def irun():
# Process command line
@@ -79,6 +82,15 @@
# static void main()
if __name__=='__main__':
+
+ # Set the signal handler to ignore hangups
+ try:
+ # Not supported by all OSs
+ signal.signal(signal.SIG_HUP, ignoreHangup)
+ except:
+ pass
+
+
#print 'Profiling....'
#import profile
#profile.run('irun()', 'iprof')
---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org