Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.0.0, 4.0.1, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0
-
None
Description
When using spawned processes, sockets opened by the client remain in CLOSE_WAIT state after closing the connection. Sockets on the remote side would be in FIN_WAIT_2 state and waiting for ACK.
When the spawned (child) process is closed, then ACK is sent and sockets are finally moved to CLOSE state on both sides.
This seems to be caused by the default handle inheritance on Windows by child processes.
On Unix it works correctly because we use FD_CLOEXEC, but on Windows it is not handled. We need to use DuplicateHandle with bInheritable = false.
See the article: http://support.microsoft.com/kb/150523/en-us/
Attachments
Issue Links
- replaces
-
QTBUG-9350 QProcess should provide a way to control whether sockets are inherited by the child process, or not
-
- Closed
-