Files
qt-creator/src/tools/process_stub/main.cpp
Marcus Tillmanns f13d9cc736 ProcessStub: Wait for detach to finish
Without calling waitpid() after detaching from the inferior
a race condition could occur where the ptrace(...) call would
finish before it was actually detached, leading to the following
gdb to fail attaching as the stub was still attached to it.

Calling waitpid here solves the race condition.

Fixes: QTCREATORBUG-29463
Change-Id: Ia1d79a18a96078bbf72589bebbc7d7ac027dea0d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-10 08:14:29 +00:00

16 KiB