Fix crash in QProcess::waitForStarted() on Unix.
authorChristian Strømme <christian.stromme@digia.com>
Tue, 13 Aug 2013 11:20:05 +0000 (13:20 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 28 Aug 2013 23:51:11 +0000 (01:51 +0200)
commit764f1a51209212b6fc60cef5c12e9748d06b57de
treed3f6f6dbf582786bc2bdd25c7387dac7b237df2d
parent9b62d3ef0bb3109f4d2d29a0b8fc6cf792729618
Fix crash in QProcess::waitForStarted() on Unix.

Invoking waitForStarted() on a QProcess before or after an unsuccessful
call to start() (e.g., with an empty command), would execute FD_SET with
an invalid file descriptor and cause the process to abort.
The bug can be reliably reproduced on OSX.

(cherry-picked from qtbase commit c8d9b17367cfdcb034d11f8a168ca4ae3993e7c3)
Task-number: QTBUG-32958
Change-Id: Id25b7781168489281645e21571361ca1a71d43e3
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
src/corelib/io/qprocess.cpp
tests/auto/qprocess/tst_qprocess.cpp