Redirection Bug in C

Clare Lee·2022년 1월 29일
0

Embedded C

목록 보기
2/3

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.

profile
2년차 임베디드 SW 개발자

0개의 댓글