GSCreator: Fix hang due to calling exit() after fork()

Authored by abizjak on Jan 19 2020, 8:34 PM.

Description

GSCreator: Fix hang due to calling exit() after fork()

Summary:
After fork(), exit() invokes atexit handlers, which can result in a lockup if an atexit handler uses thread synchronization facilities, since all but the current thread no longer exist. An example backtrace can be found in the linked bug report. Fix it by using _exit() instead of exit().

BUG: 404652
FIXED-IN: 20.03.80

Test Plan: I don't know the exact environment required to trigger this bug, but one precondition is to trigger generation of thumbnails via this code; maybe browsing folders with PDF files will do that. Once you see thumbnail.so processes staying around, you must have hit this bug. This patch should prevent this issue from occurring, and it did on my system.

Reviewers: Frameworks, elvisangelaccio

Reviewed By: elvisangelaccio

Subscribers: elvisangelaccio

Differential Revision: https://phabricator.kde.org/D26635

Details

Committed
elvisangelaccioJan 19 2020, 8:35 PM
Reviewer
elvisangelaccio
Differential Revision
D26635: GSCreator: Fix hang due to calling exit() after fork()
Parents
R373:317d80e1a827: GIT_SILENT made messages (after extraction)
Branches
Unknown
Tags
Unknown