If fclose(0) is called, does this close stdin?
The reason why I\'m asking this is that for some reason, stdin is being closed in my application and I cannot figure out
fclose(0) invokes undefined behavior, so yes, it could do anything, including closing stdin. But you have much bigger problems if fclose(0) appears in your code.
fclose(0)
stdin