From 3963c63540fb9a5da91a7a502a3906b536815d07 Mon Sep 17 00:00:00 2001 From: comex Date: Wed, 15 Apr 2015 01:49:56 -0400 Subject: improve verbose log --- darwin-bootstrap/posixspawn-hook.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'darwin-bootstrap/posixspawn-hook.c') diff --git a/darwin-bootstrap/posixspawn-hook.c b/darwin-bootstrap/posixspawn-hook.c index d2a79f4..e4f2e72 100644 --- a/darwin-bootstrap/posixspawn-hook.c +++ b/darwin-bootstrap/posixspawn-hook.c @@ -64,6 +64,9 @@ static bool spawn_unrestrict(pid_t pid, bool should_resume, bool is_exec) { ib_log("posixspawn-hook: couldn't start unrestrict - oh well..."); return false; } + if (IB_VERBOSE) + ib_log("unrestrict pid: %d; should_resume=%d is_exec=%d", + prog_pid, should_resume, is_exec); int xstat; /* reap intermediate to avoid zombie - if it doesn't work, not a big deal */ if (waitpid(prog_pid, &xstat, 0) == -1) @@ -304,8 +307,6 @@ static int hook_posix_spawn_generic(__typeof__(posix_spawn) *old, } if (fcntl(255, F_SETFD, FD_CLOEXEC)) goto crap; - if (IB_VERBOSE) - ib_log("spawning unrestrict"); if (!spawn_unrestrict(getpid(), !was_suspended, true)) goto skip; } -- cgit v1.2.3