Ok, I know this is more of a general unix question, but when I set a handler for sigchld, it causes any library function which makes a child and wants to wiat() on it throw an IOError because my handler has already wait()ed. Is there any better solution than simply wrapping all such calls in try: ... except IOError: pass ?