tr segfaults
Ralf Friedl
Ralf.Friedl at online.de
Tue Nov 13 08:56:29 PST 2007
Fernando Silveira wrote:
> Yep, but the patch follows inline. The read(2) return value was being
> stored in an unsigned variable, avoiding the error detection. I also
> added an error message, which wasn't implemented.
>
Maybe tr should not exit in this case with EXIT_SUCCESS, but return an
error? Especially as tr is most of the time used in shell scripts, where
the return code is more likely to be noticed than an error message.
GNU tr returns 1:
$ tr a b < /tmp; echo $?
tr: read error: Is a directory
1
Regards
Ralf Friedl
More information about the busybox
mailing list