Commit 4197c13d by H.J. Lu

re PR libfortran/39664 (Revision 145571 breaks stdio)

2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR libgfortran/39664
	* io/unix.c (raw_close): Don't close STDOUT_FILENO,
	STDERR_FILENO nor STDIN_FILENO.

From-SVN: r145636
parent fe0a25ec
2009-04-06 H.J. Lu <hongjiu.lu@intel.com>
PR libgfortran/39664
* io/unix.c (raw_close): Don't close STDOUT_FILENO,
STDERR_FILENO nor STDIN_FILENO.
2009-04-06 David Edelsohn <edelsohn@gnu.org> 2009-04-06 David Edelsohn <edelsohn@gnu.org>
* io/io.h (struct stream): Rename truncate to trunc. * io/io.h (struct stream): Rename truncate to trunc.
......
...@@ -344,7 +344,12 @@ raw_close (unix_stream * s) ...@@ -344,7 +344,12 @@ raw_close (unix_stream * s)
{ {
int retval; int retval;
if (s->fd != STDOUT_FILENO
&& s->fd != STDERR_FILENO
&& s->fd != STDIN_FILENO)
retval = close (s->fd); retval = close (s->fd);
else
retval = SUCCESS;
free_mem (s); free_mem (s);
return retval; return retval;
} }
......
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