in reply to Re^2: EXIT code
in thread EXIT code
Longer answer: any message written by the program is written to a certain file descriptor. Typically, error messages go to standard error, but if I got a nickle for every error message going to standard output, or half a cent for any non-error message going to standard error, I could buy Microsoft, IBM and Oracle, and still have cash to spare.
So, you would have to find out where the programs error messages are going, and redirect that channel. For instance, in Posix like shells, messages on standard error (file descriptor 2) can be redirected to a file like this:
program 2> errors_go_here
|
|---|