dyne/Tomb — Issue #63: strange errors when combining sudo and output redirecting
Author: boyska
Created: 2011-10-30 18:01:25+00:00
State: open
Labels: bug

If you run `tomb create -s 10 /tmp/foo > /dev/null`, everything is fine.
Even if you run `tomb create -s 10 /tmp/foo 2> /dev/null`.
BUT if you run `tomb create -s 10 /tmp/foo &> /dev/null`, sudo will have errors when called by pinentry.

You can reproduce this bug even in an easier way:
`sudo -S -v &> /dev/null`
Actually, it's not the `/dev/null` part that matters; you can redirect it even to `$HOME/errfile`. The **redirection** itself is the problem.
It probably has something to do with the fact that sudo closes every file descriptor.

Even if it seems that this is not a grave bug, for me it is: I am coding the GUI, and I'd like to parse tomb stdout/stderr to read errors, so I "redirect" the output to some buffers.

We could workaround this using always stdout (or stderr, no difference) when --machine-parseable (see #58); this way the GUI is no more affected by this.
What about _real solutions_ ?