I ran an executable in bash
./code > log
It shows occasional error messages on terminal whereas all printf statements go into log file. I re-run it like below
./code >& log
Now, the occasional error messages also go into log. But if there is a segmentation fault, it is still shown on terminal. Why? How to make the message Segmentation fault (core dumped) go into the log file?
user$ bash --version
GNU bash, version 4.2.24(1)-release (i686-pc-linux-gnu)