summaryrefslogtreecommitdiffstats
path: root/tests/manual/wasm/qwasmwindow/qwasmwindow.py
diff options
context:
space:
mode:
authorThiago Macieira <[email protected]>2023-02-28 10:21:05 -0800
committerThiago Macieira <[email protected]>2023-03-16 16:26:47 -0800
commit82b75570f099911076ad0e144927862e8e359fbd (patch)
treeea2b2355a62d8052dd94e71996fefe4a99c217d9 /tests/manual/wasm/qwasmwindow/qwasmwindow.py
parent96dc4acb235f13a72bef7c719d005846fe1d9726 (diff)
QProcess/Linux: fix file descriptor leak in case of failed child start
If the child failed to start, execChild() would (unnecessarily) store -1 in childStartedPipe[1] after writing the failure message to it and closing that pipe. This had worked for the previous 20 years of QProcess existence, because that was run in the child process. However, with 6.5 commit e1a787a76ed462e4ed49db78a40c6d7e272182d7 (cherry-picked to 6.4) we implemented vfork-like behavior, meaning the child would share memory with the parent and ran before the parent, so startProcess() failed to close it: // parent // close the ends we don't use and make all pipes non-blocking qt_safe_close(childStartedPipe[1]); Also updated the docs to account for the fact that this is a vfork() environment and, moreover, not using the vfork() function from glibc on Linux. [ChangeLog][QtCore][QProcess] Fixed a file descriptor leak in QProcess when running on Linux 5.4 or later, if the executable being run failed to start (for example, the file for the executable didn't exist). Pick-to: 6.4.3 6.4 6.5 Task-number: QTBUG-111243 Change-Id: I7f354474adce419ca6c2fffd17481002e4853cc3 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'tests/manual/wasm/qwasmwindow/qwasmwindow.py')
0 files changed, 0 insertions, 0 deletions