qt5base-lts/tests/auto/other
Thiago Macieira 3ccfc351fd QProcess: Handle spurious socket notifications for stdout and stderr
On Unix systems where the GUI event dispatcher uses a notification
system for socket notifiers that is out of band compared to select(),
it's possible for the QSocketNotifier to activate after the pipe has
been read from. When that happened, the ioctl(2) call with FIONREAD
might return 0 bytes available, which we interpreted to mean EOF.

Instead of doing that, always try to read at least one byte and examine
the returned byte count from read(2). If it returns 0, that's a real
EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation.

That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get
notifications and those use kevent (and, apparently, an auxiliary
thread) instead of an in-thread select() or poll(). That means the event
loop would activate the QSocketNotifier even though there is nothing to
be read.

Task-number: QTBUG-39488
Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-06-12 17:54:11 +02:00
..
atwrapper expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
baselineexample Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
collections expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
compiler Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
d3dcompiler d3dcompiler_qt: Remove control file semantics 2014-03-14 22:40:24 +01:00
gestures correct send vs sent grammar 2014-03-14 15:27:03 +01:00
headersclean headersclean: process private modules correctly 2013-07-03 15:31:13 +02:00
lancelot Fix lance opengl painting test 2014-04-04 10:55:44 +02:00
languagechange Introduce function for standard button texts to QPlatformTheme. 2014-01-18 09:23:38 +01:00
macgui Cocoa: Re-implement QCocoaScreen::topLevelAt() 2014-06-06 23:39:12 +02:00
macnativeevents correct send vs sent grammar 2014-03-14 15:27:03 +01:00
macplist Update Info.plist templates to use the current standard plist format. 2013-08-02 05:42:37 +02:00
modeltest don't erroneously claim that gui support is needed 2013-10-16 17:10:15 +02:00
networkselftest Increase timeout in tst_NetworkSelfTest. 2014-03-10 20:41:35 +01:00
qaccessibility Fix accessibility auto test 2014-05-14 20:10:03 +02:00
qaccessibilitylinux tests: Remove superfluous gui additions to QT 2014-02-28 17:59:29 +01:00
qaccessibilitymac Accessibility Mac: Cache Accessible Elements and Notify about changes 2014-04-09 10:46:02 +02:00
qcomplextext Remove QtWidgets dependency from tst_QComplexText 2014-04-04 19:32:21 +02:00
qfocusevent Cocoa: Allow frameless NSWindow child QWindows 2014-02-05 23:12:50 +01:00
qnetworkaccessmanager_and_qprogressdialog Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
qobjectperformance Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qobjectrace Fix a race that occurred as we unlock the mutex to destroy the functor in ~QObject 2013-11-26 08:24:25 +01:00
qprocess_and_guieventloop QProcess: Handle spurious socket notifications for stdout and stderr 2014-06-12 17:54:11 +02:00
qsharedpointer_and_qwidget Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qtokenautomaton Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qvariant_common Remove trailing space from QDebug stream 2013-12-06 13:33:10 +01:00
windowsmobile Whitespace cleanup: remove trailing whitespace 2013-03-16 20:22:50 +01:00
other.pro QProcess: Handle spurious socket notifications for stdout and stderr 2014-06-12 17:54:11 +02:00