diff --git a/gui/ollie9pclient.cpp b/gui/ollie9pclient.cpp index a5870b2..90c9585 100644 --- a/gui/ollie9pclient.cpp +++ b/gui/ollie9pclient.cpp @@ -241,6 +241,15 @@ QByteArray Ollie9pClient::run9p(const QStringList &args) QStringList fullArgs = {"-a", serverAddr()}; fullArgs.append(args); proc.start(ninepBin(), fullArgs); - proc.waitForFinished(10000); - return proc.readAllStandardOutput(); + + // Drain output while waiting. The log file can be up to 64KB; if the + // parent doesn't read, the child blocks on a full pipe and never exits, + // causing "QProcess: Destroyed while process is still running". + QByteArray out; + while (proc.state() != QProcess::NotRunning) { + if (proc.waitForReadyRead(100)) + out += proc.readAllStandardOutput(); + } + out += proc.readAllStandardOutput(); + return out; }