Bugfixes 2 #208

Merged
andrey merged 10 commits from bugfixes2 into master 2026-08-05 23:26:37 +03:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit e05abf16b5 - Show all commits
+3 -3
View File
@@ -65,9 +65,9 @@ void PIWaitEvent::destroy() {
} }
#else #else
for (int i = 0; i < 2; ++i) { for (int i = 0; i < 2; ++i) {
if (pipe_fd[i] != 0) { if (pipe_fd[i] != -1) {
::close(pipe_fd[i]); ::close(pipe_fd[i]);
pipe_fd[i] = 0; pipe_fd[i] = -1;
} }
} }
#endif #endif
@@ -140,7 +140,7 @@ bool PIWaitEvent::isCreate() const {
#ifdef WINDOWS #ifdef WINDOWS
return event; return event;
#else #else
return pipe_fd[ReadEnd] != 0; return pipe_fd[ReadEnd] != -1;
#endif #endif
} }
+1 -1
View File
@@ -55,7 +55,7 @@ private:
#ifdef WINDOWS #ifdef WINDOWS
void * event = nullptr; void * event = nullptr;
#else #else
int pipe_fd[2] = {0, 0}; int pipe_fd[2] = {-1, -1};
fd_set fds[3]; fd_set fds[3];
enum { enum {
ReadEnd = 0, ReadEnd = 0,