I am using HP-UX. I want to disable buffering on stdout to ensure that every line of code is printed in case of a main dump using the command below:
setvbuf(stdout, NULL, _IONBF, 0);
In this case, does printing on stdout, which is redirected to some log file also affect other processes? I want to know if this change is only local to the running process or not. Also, is it possible to disable buffering in the process and then set it _IO_FBF in code again? (fflush before each call)
PS: I know that this will disable buffering and degrade I / O performance, but I want to do this for debugging purposes only.
source share