summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/x11
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-11-09 09:16:04 +0100
committerGitHub <noreply@github.com>2022-11-09 09:16:04 +0100
commit29de658c2908b6b50b218225539f9779292eb870 (patch)
treec63906a8e90598da10e5eaa1a4c332a8405f1ecb /platform/linuxbsd/x11
parent7d4e23b6b4f7c512f72bd876805af85038753270 (diff)
parent5860f81c18a2de8b3f38d5a58946939b5cc81425 (diff)
Merge pull request #68345 from Abdul-AZ/master
Fix static object destructors being called on gpu selection with X11
Diffstat (limited to 'platform/linuxbsd/x11')
-rw-r--r--platform/linuxbsd/x11/detect_prime_x11.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/linuxbsd/x11/detect_prime_x11.cpp b/platform/linuxbsd/x11/detect_prime_x11.cpp
index fb833ab5e6..78a10fa2b0 100644
--- a/platform/linuxbsd/x11/detect_prime_x11.cpp
+++ b/platform/linuxbsd/x11/detect_prime_x11.cpp
@@ -208,7 +208,10 @@ int detect_prime() {
print_verbose("Couldn't write vendor/renderer string.");
}
close(fdset[1]);
- exit(0);
+
+ // The function quick_exit() is used because exit() will call destructors on static objects copied by fork().
+ // These objects will be freed anyway when the process finishes execution.
+ quick_exit(0);
}
}