You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vince Buffalo edited this page Feb 28, 2015
·
1 revision
By default, Python handles SIGPIPE in a non-standard way. There's more on this issue here and it has caused problems between Samtools and Tophat.
It can be solved with this fix from Colin Watson:
import signal
import subprocess
def subprocess_setup():
# Python installs a SIGPIPE handler by default. This is usually not what
# non-Python subprocesses expect.
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
subprocess.Popen(command, preexec_fn=subprocess_setup)