If I run such a bash script, and in the script, it will invoke some executable command, such as the following
myexec args1 arg2 > out.txt
myexec will print some log info through the c API printf. If I interrupt the script, because myexec is stuck by some unknown reason, does some log information will be lost, and not save to the out.txt file? In my experiment, I found it is, but is there any way to solve this? and I do not know why the log information not flush to the out.txt file
========
I use the stdbuf solved my problem, the related question is: Force line-buffering of stdout when piping to tee