mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 15:05:59 +01:00
Fix occasional hangups on exit
This commit is contained in:
parent
ece3ac97f9
commit
43aea417b0
1 changed files with 8 additions and 0 deletions
|
@ -233,6 +233,14 @@ void CCompositor::cleanup() {
|
|||
wl_display_terminate(m_sWLDisplay);
|
||||
|
||||
m_sWLDisplay = nullptr;
|
||||
|
||||
// kill the PID with a sigkill after 2 seconds
|
||||
const auto PID = getpid();
|
||||
|
||||
std::string call = "sleep 2 && kill -9 " + std::to_string(PID);
|
||||
|
||||
execl("/bin/sh", "/bin/sh", "-c", call.c_str(), ">", "/dev/null", nullptr); // this is to prevent that random "freezing"
|
||||
// the PID should not be reused.
|
||||
}
|
||||
|
||||
void CCompositor::startCompositor() {
|
||||
|
|
Loading…
Reference in a new issue