diff options
-rw-r--r-- | src/afb-debug.c | 6 | ||||
-rw-r--r-- | src/main.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/afb-debug.c b/src/afb-debug.c index e7a5c643..db403a6b 100644 --- a/src/afb-debug.c +++ b/src/afb-debug.c @@ -30,6 +30,9 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> +#if !defined(NO_CALL_PERSONALITY) +#include <sys/personality.h> +#endif #include "verbose.h" @@ -98,6 +101,9 @@ void afb_debug(const char *key) indicate(NULL); sigprocmask(SIG_SETMASK, &oss, NULL); NOTICE("DEBUG WAIT after %s", key); +#if !defined(NO_CALL_PERSONALITY) + personality((unsigned long)-1L); +#endif } if (has_key(key, secure_getenv(key_env_break))) { NOTICE("DEBUG BREAK before %s", key); @@ -29,6 +29,10 @@ #include <sys/stat.h> #include <sys/wait.h> +#if !defined(NO_CALL_PERSONALITY) +#include <sys/personality.h> +#endif + #include <json-c/json.h> #include <systemd/sd-daemon.h> @@ -598,6 +602,9 @@ static void start(int signum) /* start the services */ afb_debug("start-start"); +#if !defined(NO_CALL_PERSONALITY) + personality((unsigned long)-1L); +#endif if (afb_apiset_start_all_services(main_apiset, 1) < 0) goto error; |