I am debugging an application that has to run with other components. I am wrapping everything in a script:
#!/bin/bash ./component1 > 1.log & ./my_application & ./component2 > 2.log &
I want to see the output in the terminal so I didn't redirect the output of
my_application had a segfault. But the weird thing is that the output line that complains about the segmentation fault information is not printing out in my terminal. That very last line is simply missing.
If I run
./my_appliation alone in another terminal, then the output works fine. I see the last line of "Segmentation fault"
Why is my output missing when I run my application with & ? What difference does it make if I add & to the end of the command?