-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: void register signal handler for SIG_CHILD
linuxdeepin/developer-center#4412 QProcess::execute will use waitid to get exit code of that process it starts. Register SIG_CHILD and wait all dead childs will break this mechanism, as QProcess will find out that there is no child to wait, and report this situation as a child process exit by crash. So I change the method of launch application to use a double fork, to start process and detach. Just as the way `QProcess` get this job done in its `startDetached` method. As a quick fix, I change the signature of `launch` method as no one use its return value currently. If this is need someday, we should use a pipe to let double forked child process report the return value and errno of its `exec` call. Signed-off-by: black-desk <me@black-desk.cn>
- Loading branch information
1 parent
caf789e
commit 1fdbd02
Showing
2 changed files
with
41 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters