So I\'m building a Unix minishell in C, and am implementing input, output, and err redirection, and have come across a problem with files. I open my files in a loop where I
The standard says:
The fclose() function shall perform the equivalent of a close() on the file descriptor that is associated with the stream pointed to by stream.
close()
So calling fclose is enough; it will also close the descriptor.
fclose