diff options
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 4 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 6ac6dfe89d0..892a2456ac7 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -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 diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index b3645f0003d..b6afe8ddfcc 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -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; |