diff options
author | Robert Knight <robert.knight@mendeley.com> | 2011-11-18 18:07:21 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-18 20:25:53 +0100 |
commit | 67106b169cd847f30ad6f1e7932acb0e3c3c8fe1 (patch) | |
tree | 5abfe8c6c0569d79a0c2da93b2266946cd9bb258 /tests/auto/opengl/qglthreads | |
parent | 36ea62e64f8ab950c733541fe4abcd05dd523046 (diff) |
Fix sporadic hang in QLocalServer::close() in OS X 10.7
There is a bug in CFSocket/CFRunLoopSource in OS X 10.7 which can lead to a deadlock
in CFRunLoopRemoveSource or CFRunLoopSourceInvalidate if the CFSocket manager thread
is concurrently calling CFSocketInvalidate as a result of the socket's file descriptor
having been closed.
QLocalServer::close() triggers this race by closing the socket fd before unregistering
the QSocketNotifier, which internally uses CFSocket.
This commit fixes the problem by changing the ordering in close() so that the socket notifier
is disabled before closing the file descriptor. This change also makes QLocalServer::close()
perform operations in reverse order to QLocalServer::listen(), as would be expected.
Task-number: QTBUG-22789
Merge-request: 1470
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit a9c3f7169faf4621d39714f753d6e8b376c5d6e5)
Change-Id: Ia9c3f7169faf4621d39714f753d6e8b376c5d6e5
Diffstat (limited to 'tests/auto/opengl/qglthreads')
0 files changed, 0 insertions, 0 deletions