#70 'unbuffer' eats exit codes of the programs

closed-fixed
None
5
2010-08-31
2010-02-11
No

Try:

$ unbuffer cat /sdlfjsdlfjsld
cat: /sdlfjsdlfjsld: No such file or directory
$ echo $?
0

I don't know if this is intentional, but I believe (and seems to be more logical for me), that the result should be 1. What do you think?

Proposed patch fixes the script when called without '-p' arg. There will be probably also necessary fix behaviour when unbuffer is called with '-p' arg, but I didn't explore that.

Discussion

  • Proposed patch (I know it's not against latest CVS, but it's just oneliner...)

     
  • Applied with small change: 'wait' is equivalent to 'eval wait', the 'eval' is superfluous here.

     
    • assigned_to: nobody --> andreas_kupries
    • status: open --> closed-fixed