Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0 Alpha
-
-
979c8b746b56b8e68acf47b5af2eecf834043b50
Description
On macOS, the ::accept call in qt_safe_accept intermittently blocks indefinitely in the attached code, causing a hang.
To demonstrate in the attached code, build and run in the terminal (and Ctrl+C to quit):
./NCA-9481-widgets.app/Contents/MacOS/NCA-9481-widgets
After several repeats, the hang will occur. It seems that qt_safe_accept sometimes gets called spuriously a second time, and ::accept blocks. Adding O_NONBLOCK to the qt_safe_socket call in QLocalServerPrivate::listen(const QString &) makes the hang go away.