Compare commits
5 Commits
aa140fd4ec
...
53faaeb396
| Author | SHA1 | Date | |
|---|---|---|---|
| 53faaeb396 | |||
| 2928a690b8 | |||
| 220ce225f8 | |||
| ac89c499ab | |||
| 8d1c97da04 |
@@ -211,14 +211,14 @@ PRIVATE_DEFINITION_START(PIProcess)
|
||||
while (1) {
|
||||
# ifdef WINDOWS
|
||||
DWORD available = 0;
|
||||
bytes_read = 0;
|
||||
bytes_read = 0;
|
||||
PeekNamedPipe(pipes[pipe_type][PipeRead], nullptr, 0, nullptr, &available, nullptr);
|
||||
if (available > 0) {
|
||||
BOOL ok = ReadFile(pipes[pipe_type][PipeRead],
|
||||
read_buffer.data(offset),
|
||||
piMini(available, read_buffer.size() - offset),
|
||||
&bytes_read,
|
||||
nullptr);
|
||||
read_buffer.data(offset),
|
||||
piMini(available, read_buffer.size() - offset),
|
||||
&bytes_read,
|
||||
nullptr);
|
||||
if (!ok) bytes_read = 0;
|
||||
}
|
||||
# else
|
||||
@@ -244,7 +244,7 @@ PRIVATE_DEFINITION_START(PIProcess)
|
||||
# else
|
||||
sz = ::write(pipes[StdIn][PipeWrite], data.data(), data.size());
|
||||
# endif
|
||||
return sz == data.size_s();
|
||||
return sz == (SizeType)data.size_s();
|
||||
}
|
||||
|
||||
PRIVATE_DEFINITION_END(PIProcess)
|
||||
@@ -354,7 +354,7 @@ void PIProcess::startProc(bool detached) {
|
||||
if (WIFEXITED(exit_code)) {
|
||||
exec_finished = WEXITSTATUS(exit_code) != 127;
|
||||
}
|
||||
pid_ = 0;
|
||||
pid_ = 0;
|
||||
if (!detached) PRIVATE->pid = pid_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -462,13 +462,15 @@ bool procDpkg(const PIString & l) {
|
||||
PIFile::FileInfo fi;
|
||||
fi.path = l;
|
||||
PIString cmd = dpkg + dpkgdir + " -S " + fi.name() + ign_err_suffix;
|
||||
// PICout(true) << cmd;
|
||||
// PICout(true) << "** dpkg:" << cmd;
|
||||
PIString vs = execute(cmd).trim();
|
||||
if (!vs.isEmpty()) {
|
||||
PIStringList lines = vs.split('\n').reverse();
|
||||
for (auto l: lines) {
|
||||
l = l.left(l.find(":"));
|
||||
if (!l.isEmpty() && !l.endsWith("-cross")) all_deps << l;
|
||||
auto sl = l;
|
||||
l = l.left(l.find(":"));
|
||||
if (!l.isEmpty() && !l.endsWith("-cross") && !l.contains(' ')) all_deps << l;
|
||||
// PICout(true) << "** found \"" << l << "\" in \"" << sl << "\"";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user