Skip to content

Commit

Permalink
Fix static object destructors being called on gpu selection with X11
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdul-AZ committed Nov 7, 2022
1 parent f814e15 commit 5860f81
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platform/linuxbsd/x11/detect_prime_x11.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 5860f81

Please sign in to comment.