Commit 40e43495 by Jerry DeLisle

unix.c (fd_close): Do not close STDIN.

2008-03-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/unix.c (fd_close):  Do not close STDIN.

From-SVN: r133630
parent e61c4586
2008-03-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* io/unix.c (fd_close): Do not close STDIN.
2007-03-23 Thomas Koenig <tkoenig@gcc.gnu.org 2007-03-23 Thomas Koenig <tkoenig@gcc.gnu.org
PR libfortran/32972 PR libfortran/32972
......
...@@ -871,7 +871,7 @@ fd_close (unix_stream * s) ...@@ -871,7 +871,7 @@ fd_close (unix_stream * s)
if (s->buffer != NULL && s->buffer != s->small_buffer) if (s->buffer != NULL && s->buffer != s->small_buffer)
free_mem (s->buffer); free_mem (s->buffer);
if (s->fd != STDOUT_FILENO && s->fd != STDERR_FILENO) if (s->fd != STDOUT_FILENO && s->fd != STDERR_FILENO && s->fd != STDIN_FILENO)
{ {
if (close (s->fd) < 0) if (close (s->fd) < 0)
return FAILURE; return FAILURE;
......
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