diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-08-18 22:35:55 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-08-18 22:36:58 +0200 |
| commit | 43aea417b0ed46e9ab634f32c0cc8b47c94e64ee (patch) | |
| tree | def512a693aa3bb31fca1dfadf820c19bfd912b2 /src/Compositor.cpp | |
| parent | ece3ac97f932b1f39314cf63ec8e9abb5172104e (diff) | |
Fix occasional hangups on exit
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 5d6d65ec..bf549695 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -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() { |
