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
This commit is contained in:
parent
fe0a25ec79
commit
4197c13d08
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* io/io.h (struct stream): Rename truncate to trunc.
|
||||
|
|
|
@ -344,7 +344,12 @@ raw_close (unix_stream * s)
|
|||
{
|
||||
int retval;
|
||||
|
||||
if (s->fd != STDOUT_FILENO
|
||||
&& s->fd != STDERR_FILENO
|
||||
&& s->fd != STDIN_FILENO)
|
||||
retval = close (s->fd);
|
||||
else
|
||||
retval = SUCCESS;
|
||||
free_mem (s);
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue