--- /usr/lib/python2.4/subprocess.py 2006-07-30 17:44:09.000000000 +0200 +++ subprocess.py 2006-07-31 17:43:23.000000000 +0200 @@ -922,11 +922,11 @@ # Close pipe fds. Make sure we doesn't close the same # fd more than once. - if p2cread: + if p2cread and p2cread not in (0,): os.close(p2cread) - if c2pwrite and c2pwrite not in (p2cread,): + if c2pwrite and c2pwrite not in (p2cread, 1): os.close(c2pwrite) - if errwrite and errwrite not in (p2cread, c2pwrite): + if errwrite and errwrite not in (p2cread, c2pwrite, 2): os.close(errwrite) # Close all other fds, if asked for