Bugfixes part 3 #209

Open
andrey wants to merge 36 commits from bugfixes3 into master
Showing only changes of commit cb5530c864 - Show all commits
+10 -1
View File
@@ -242,7 +242,16 @@ PRIVATE_DEFINITION_START(PIProcess)
BOOL ok = WriteFile(pipes[StdIn][PipeWrite], data.data(), data.size(), &sz, NULL); BOOL ok = WriteFile(pipes[StdIn][PipeWrite], data.data(), data.size(), &sz, NULL);
if (!ok) sz = 0; if (!ok) sz = 0;
# else # else
sz = ::write(pipes[StdIn][PipeWrite], data.data(), data.size()); size_t offset = 0;
while (offset < data.size()) {
ssize_t wr = ::write(pipes[StdIn][PipeWrite], data.data() + offset, data.size() - offset);
if (wr < 0) {
if (errno == EINTR) continue;
return false;
}
offset += wr;
}
sz = offset;
# endif # endif
return sz == (SizeType)data.size_s(); return sz == (SizeType)data.size_s();
} }