Merge pull request #68345 from Abdul-AZ/master

Fix static object destructors being called on gpu selection with X11
This commit is contained in:
Rémi Verschelde 2022-11-09 09:16:04 +01:00 committed by GitHub
commit 29de658c29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}
}