From 77fb0083a4ccf402fafdc83d065d049d473b2158 Mon Sep 17 00:00:00 2001 From: Mike Keesey Date: Mon, 5 Oct 2009 09:23:53 -0600 Subject: [PATCH] updated nio native code to properly check for PIPE closure on POSIX OSes --- classpath/java-nio.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 };