summaryrefslogtreecommitdiff
path: root/platform/linuxbsd/x11
diff options
context:
space:
mode:
authorAbdulrahman Al Zeidi <abdullrohman514@gmail.com>2022-11-07 09:27:24 +0000
committerAbdulrahman Al Zeidi <abdullrohman514@gmail.com>2022-11-07 12:08:52 +0000
commit5860f81c18a2de8b3f38d5a58946939b5cc81425 (patch)
tree5ad9f27c3959885b879e5fb2093b5c2331aba9c9 /platform/linuxbsd/x11
parentf814e15c7f60a685e8b3623fc93231c18ccd3627 (diff)
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);
}
}