diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2018-05-21 17:15:12 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-07-03 11:12:24 +0100 |
commit | 401e0dff33a9942cba45e2f67eec22970d71b341 (patch) | |
tree | 57a86ec4c3ab2e1ea5ceae4892864f4cdc915194 | |
parent | a34d1fd23449ee1518352aed896550da66a877a5 (diff) |
WIP SAVEworking
-rw-r--r-- | src/daemon.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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 <sys/un.h> #include <sys/stat.h> #include <sys/wait.h> +#include <sys/prctl.h> #include <fcntl.h> #include <pwd.h> #include <grp.h> @@ -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); |