signals and multithreaded apps

Nathan Clegg nathan at islanddata.com
Fri Aug 20 22:23:06 EDT 1999


If I'm receiving on a socket or sleeping, even the friendliest of handled
signals will cause an IOError exception.  Thus I've put extra loops around
every sleep, receive, etc., to keep them alive.  This is a little
annoying, but doable.  However, do I also need to protect database
queries, file writes, and print statements?  Some of these are difficult
to test because they are so short, but I don't want my app to except out
on that fateful 1000th run because a SIGHUP was sent at the wrong
nanosecond that I didn't prepare for.  Any wisdom on the safes and unsafes?


----------------------------------
Nathan Clegg
 nathan at islanddata.com






More information about the Python-list mailing list