Commit 12e59662 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR libfortran/20179 (cannot mix C and Fortran I/O)

	PR libfortran/20179
	* io/unix.c (fd_close): Add test so that we don't close()
	stdout and stderr.

From-SVN: r100353
parent 66859ace
2005-05-23 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/20179
* io/unix.c (fd_close): Add test so that we don't close()
stdout and stderr.
2005-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR libfortran/20006
......
......@@ -542,8 +542,11 @@ fd_close (unix_stream * s)
if (s->buffer != NULL && s->buffer != s->small_buffer)
free_mem (s->buffer);
if (close (s->fd) < 0)
return FAILURE;
if (s->fd != STDOUT_FILENO && s->fd != STDERR_FILENO)
{
if (close (s->fd) < 0)
return FAILURE;
}
free_mem (s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment