Fixed closing-behaviour of stdout and stderr
authorphil <none@none>
Wed, 25 Nov 1998 11:46:04 +0000 (11:46 +0000)
committerphil <none@none>
Wed, 25 Nov 1998 11:46:04 +0000 (11:46 +0000)
nat/io.c

index 93d6842d3a0e95a9daa168f5a41ac2c5c16cbd40..7f28498969ac96b41d626a2b54ac2c73d2c14ac1 100644 (file)
--- a/nat/io.c
+++ b/nat/io.c
@@ -199,7 +199,10 @@ void java_io_FileOutputStream_writeBytes (struct java_io_FileOutputStream* this,
                             
 void java_io_FileOutputStream_close (struct java_io_FileOutputStream* this)
 {
-       if (this->fd->fd == 1)  /* don't close stderr!!! -- phil. */
+       if (this->fd->fd == fileno(stderr))  /* don't close stderr!!! -- phil. */
+               return;
+
+       if (this->fd->fd == fileno(stdout))
                return;
 
        if (this->fd->fd >= 0) {