diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,7 @@ check_include_file("sys/prctl.h" HAVE_SYS_PRCTL_H) check_symbol_exists(PR_SET_DUMPABLE "sys/prctl.h" HAVE_PR_SET_DUMPABLE) +check_symbol_exists(PR_SET_PDEATHSIG "sys/prctl.h" HAVE_PR_SET_PDEATHSIG) check_include_file("sys/procctl.h" HAVE_SYS_PROCCTL_H) check_symbol_exists(PROC_TRACE_CTL "sys/procctl.h" HAVE_PROC_TRACE_CTL) if (HAVE_PR_SET_DUMPABLE OR HAVE_PROC_TRACE_CTL) diff --git a/config-kwin.h.cmake b/config-kwin.h.cmake --- a/config-kwin.h.cmake +++ b/config-kwin.h.cmake @@ -18,6 +18,7 @@ #cmakedefine01 HAVE_WAYLAND_EGL #cmakedefine01 HAVE_SYS_PRCTL_H #cmakedefine01 HAVE_PR_SET_DUMPABLE +#cmakedefine01 HAVE_PR_SET_PDEATHSIG #cmakedefine01 HAVE_SYS_PROCCTL_H #cmakedefine01 HAVE_PROC_TRACE_CTL #cmakedefine01 HAVE_BREEZE_DECO diff --git a/helpers/xclipboardsync/main.cpp b/helpers/xclipboardsync/main.cpp --- a/helpers/xclipboardsync/main.cpp +++ b/helpers/xclipboardsync/main.cpp @@ -21,8 +21,17 @@ #include +#include +#if HAVE_PR_SET_PDEATHSIG +#include +#include +#endif + int main(int argc, char *argv[]) { +#if HAVE_PR_SET_PDEATHSIG + prctl(PR_SET_PDEATHSIG, SIGTERM); +#endif qputenv("QT_QPA_PLATFORM", "xcb"); QGuiApplication app(argc, argv); // perform sanity checks