diff options
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/caps.c | 5 | ||||
-rw-r--r-- | src/daemon/main.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/daemon/caps.c b/src/daemon/caps.c index f7b6658b..707b5323 100644 --- a/src/daemon/caps.c +++ b/src/daemon/caps.c @@ -34,6 +34,7 @@ #include <pulsecore/macro.h> #include <pulsecore/core-error.h> #include <pulsecore/log.h> +#include <pulsecore/core-util.h> #ifdef HAVE_SYS_CAPABILITY_H #include <sys/capability.h> @@ -112,9 +113,9 @@ void pa_drop_caps(void) { #ifndef __OPTIMIZE__ /* Valgrind doesn't not know set_caps, so we bypass it here -- but - * only in development builts.*/ + * only in development builds.*/ - if (getenv("VALGRIND") && !pa_have_caps()) + if (pa_in_valgrind() && !pa_have_caps()) return; #endif diff --git a/src/daemon/main.c b/src/daemon/main.c index 53f5d193..fad635f0 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -793,6 +793,8 @@ int main(int argc, char *argv[]) { pa_log_debug(_("Compiled with Valgrind support: no")); #endif + pa_log_debug(_("Running in valgrind mode: %s"), pa_yes_no(pa_in_valgrind())); + #ifdef __OPTIMIZE__ pa_log_debug(_("Optimized build: yes")); #else |