From: Jérémie Galarneau Date: Tue, 29 Sep 2015 16:18:49 +0000 (-0400) Subject: Add logging to the run_as worker X-Git-Tag: v2.8.0-rc1~298 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=978d5d792dfb3f07d4b7166f3037b211f3ed5cc7;p=lttng-tools.git Add logging to the run_as worker Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/runas.c b/src/common/runas.c index 08979fb79..2f2c0c7c3 100644 --- a/src/common/runas.c +++ b/src/common/runas.c @@ -532,6 +532,7 @@ void reset_sighandler(void) { int sig; + DBG("Resetting run_as worker signal handlers to default"); for (sig = SIGHUP; sig <= SIGUNUSED; sig++) { /* Skip unblockable signals. */ if (sig == SIGKILL || sig == SIGSTOP) { @@ -598,6 +599,7 @@ int run_as_create_worker(char *procname) ret = -1; } worker->sockpair[1] = -1; + LOG(ret ? PRINT_ERR : PRINT_DBG, "run_as worker exiting (ret = %d)", ret); exit(ret ? EXIT_FAILURE : EXIT_SUCCESS); } else { /* Parent */ @@ -647,11 +649,13 @@ void run_as_destroy_worker(void) { struct run_as_worker *worker = global_worker; + DBG("Destroying run_as worker"); pthread_mutex_lock(&worker_lock); if (!worker) { goto end; } /* Close unix socket */ + DBG("Closing run_as worker socket"); if (lttcomm_close_unix_sock(worker->sockpair[0])) { PERROR("close"); }