updated nio native code to properly check for PIPE closure on POSIX OSes

This commit is contained in:
Mike Keesey 2009-10-05 09:23:53 -06:00
parent 447741d6ec
commit 77fb0083a4

View File

@ -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
};