An Interesting Redirection Bug. How Redirection Can Change Program Behavior.
For a compiled code that prints out "Hello world",
if
gcc ./a.out > test.txt
is done, you get a segfault.
The interesting part is that the behavior of the hello world program changes depending on whether or not it pipes out to another file.
I didn't totally understand this video I will have to look into it again.