diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-03-27 16:44:41 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-03-27 16:44:41 +0100 |
commit | 1f8ec5b6a4bed3cfa02eaa36d39bceb7d37fc891 (patch) | |
tree | f225e5fe3d34ba9468634628338a16b1d087071f /src/libs/installer/adminauthorization_x11.cpp | |
parent | b170fae8b21e25b9ddfc66f985e7d7040ab3d2c0 (diff) | |
parent | ddf7aa85ec7bada4a96b2692e4b9f1bdd709cbad (diff) |
Merge remote-tracking branch 'origin/1.5'
Conflicts:
installerfw.pri
Change-Id: I8bd85997fef0fcfa21a4dd28a6362748a54a4a3b
Diffstat (limited to 'src/libs/installer/adminauthorization_x11.cpp')
-rw-r--r-- | src/libs/installer/adminauthorization_x11.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libs/installer/adminauthorization_x11.cpp b/src/libs/installer/adminauthorization_x11.cpp index d2d1ad669..92567050a 100644 --- a/src/libs/installer/adminauthorization_x11.cpp +++ b/src/libs/installer/adminauthorization_x11.cpp @@ -177,19 +177,21 @@ bool AdminAuthorization::execute(QWidget *parent, const QString &program, const QRegExp re(QLatin1String("[Pp]assword.*:")); QByteArray errData; flags = ::fcntl(masterFD, F_GETFD); -// if (flags != -1) -// ::fcntl(masterFD, F_SETFL, flags | O_NONBLOCK); int bytes = 0; int errBytes = 0; char buf[1024]; + char errBuf[1024]; while (bytes >= 0) { int state; if (::waitpid(child, &state, WNOHANG) == -1) break; bytes = ::read(masterFD, buf, 1023); - errBytes = ::read(pipedData[0], buf, 1023); + errBytes = ::read(pipedData[0], errBuf, 1023); if (errBytes > 0) + { errData.append(buf, errBytes); + errBytes=0; + } if (bytes > 0) { const QString line = QString::fromLatin1(buf, bytes); if (re.indexIn(line) != -1) { |