From 401e0dff33a9942cba45e2f67eec22970d71b341 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Mon, 21 May 2018 17:15:12 +0100 Subject: WIP SAVE --- src/daemon.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/daemon.cpp b/src/daemon.cpp index fbd03d8..f91cd66 100644 --- a/src/daemon.cpp +++ b/src/daemon.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -562,6 +563,9 @@ bool Daemon::check_agent(int &streamfd) // we are the child here, we return to do the stream work + // we don't want to outlive the daemon process + prctl(PR_SET_PDEATHSIG, SIGKILL); + // TODO handle cases where the child die launching it again uid_t uid = terminal_info[current_tty].uid; syslog(LOG_DEBUG, "trace %d uid %d", __LINE__, (int) uid); -- cgit v1.2.3