Don't test the undefined behavior of fileno() on a closed file, but use fstat() as a reliable test if the file was closed or not.
86 KiB
86 KiB
Don't test the undefined behavior of fileno() on a closed file, but use fstat() as a reliable test if the file was closed or not.