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
This commit is contained in:
Jerry DeLisle 2008-03-27 05:30:18 +00:00
parent e61c4586c2
commit 40e43495ce
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
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
PR libfortran/32972

View File

@ -871,7 +871,7 @@ fd_close (unix_stream * s)
if (s->buffer != NULL && s->buffer != s->small_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)
return FAILURE;