"James" <[EMAIL PROTECTED]> wrote > signal.signal(signal.SIGPIPE, signal.SIG_DFL) > > Before the snippet of code I included in my original e-mail > (subprocess.call( "yes '' | make oldconfig" , shell=True )) got rid > of the error. I can't seem to figure out precisely what the > signal.signal() function does (as shown above).
A signal is basically an interrupt. Its raised by the OS. signal.signal catches the named signal(s) and handles it. The default handler appears to just swallow the signal silently. Its a bit like, in Python, doing try: someFunc() except SomeError: pass The except clause catches the error but ignores it. signal.signal is doing much the same but at the OS level. My personal approach is to avoid using signal to trap and ignore signals since they can be needed by other processes running concurrently on the machine, but in this case it appears harmless. But in general, any approach which could interfere in unpredicable ways with other processes on the computer is a risky strategy IMHO. HTH, Alan G. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor