Spawing external diff fails with 'Bad file descriptor'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
John A Meinel |
Bug Description
For an unknown reason, when running
'bzr diff --diff-options -b'
We get this error:
=== modified file 'bzrlib/
diff: standard output: Bad file descriptor
bzr: ERROR: external diff failed with 2; command: ['diff', '--label', u'bzrlib/
Looking closer, I can tell we are passing stdout as the file descriptor (fileno() == 1).
It seems we have to be doing something weird to stdout to cause it to complain that it is a bad file descriptor.
This probably should block 0.9, since it means external diff support is broken.
Related branches
Changed in bzr: | |
status: | Fix Committed → Fix Released |
There is a bug in subprocess where it closes the original stdin/stdout/etc if you pass in an alternative one.
So if you pass in the real stdin, it gets closed.
Found by Adeodato Simó.