diff options
| author | John van Groningen | 2004-06-25 15:16:49 +0000 |
|---|---|---|
| committer | John van Groningen | 2004-06-25 15:16:49 +0000 |
| commit | b0240d4f28e51f6b027a6d033976f6542faaf341 (patch) | |
| tree | 0a1789b0dd9ea8ad69ef6eb02a949e31bb4b25a0 | |
| parent | fix freads and freadline for redirected stdio on macho, (diff) | |
test for error when closing stdio
| -rw-r--r-- | ufileIO2.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -386,6 +386,8 @@ int close_file (long fn) if (!stdio_open) IO_error ("fclose: file not open (stdio)"); stdio_open=0; + if (ferror (stdin) || ferror (stdout)) + return 0; } return -1; } else { |
