Commits

Brodie Rao committed de8266b

Fix bad usage of resetsigpipe

  • Participants
  • Parent commits 665222f

Comments (0)

Files changed (1)

 def patch(cmd, diff):
     """Run echo [lines from diff] | cmd -p0"""
     p = subprocess.Popen([cmd, '-p0'], bufsize=-1, stdin=subprocess.PIPE,
-                         universal_newlines=True, preexec_fn=resetsigpipe,
+                         universal_newlines=True,
+                         preexec_fn=makeresetsigpipe(),
                          close_fds=os.name == 'posix')
     p.communicate(''.join(diff))
     return p.returncode == 0