diff --git a/classpath/java-nio.cpp b/classpath/java-nio.cpp index 8eec3cc5fc..11765dcfad 100644 --- a/classpath/java-nio.cpp +++ b/classpath/java-nio.cpp @@ -521,15 +521,18 @@ class Pipe { if (setBlocking(e, pipe[0], false)) { setBlocking(e, pipe[1], false); } + + open_ = true; } void dispose() { ::close(pipe[0]); ::close(pipe[1]); + open_ = false; } bool connected() { - return true; + return open_; } int reader() { @@ -542,6 +545,7 @@ class Pipe { private: int pipe[2]; + bool open_; #endif };