Bugfixes 2 #208
@@ -65,9 +65,9 @@ void PIWaitEvent::destroy() {
|
||||
}
|
||||
#else
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (pipe_fd[i] != 0) {
|
||||
if (pipe_fd[i] != -1) {
|
||||
::close(pipe_fd[i]);
|
||||
pipe_fd[i] = 0;
|
||||
pipe_fd[i] = -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -140,7 +140,7 @@ bool PIWaitEvent::isCreate() const {
|
||||
#ifdef WINDOWS
|
||||
return event;
|
||||
#else
|
||||
return pipe_fd[ReadEnd] != 0;
|
||||
return pipe_fd[ReadEnd] != -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
#ifdef WINDOWS
|
||||
void * event = nullptr;
|
||||
#else
|
||||
int pipe_fd[2] = {0, 0};
|
||||
int pipe_fd[2] = {-1, -1};
|
||||
fd_set fds[3];
|
||||
enum {
|
||||
ReadEnd = 0,
|
||||
|
||||
Reference in New Issue
Block a user