diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-05-31 04:27:03 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-05-31 04:27:03 +0200 |
commit | d88a251b125f6e9178b9ca9ea47ab7da3234cb58 (patch) | |
tree | 6c982e764f991ed9169bd4fb53a601dcd295795b /src/core/execute.c | |
parent | 256425cc10d74c13602527eb86b4ba0938964565 (diff) |
util: introduce a proper nsec_t and make use of it where appropriate
Diffstat (limited to 'src/core/execute.c')
-rw-r--r-- | src/core/execute.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/execute.c b/src/core/execute.c index 9c2006ebc7..3ef4eafa7f 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -1183,7 +1183,7 @@ int exec_spawn(ExecCommand *command, goto fail_child; } - if (context->timer_slack_nsec_set) + if (context->timer_slack_nsec != (nsec_t) -1) if (prctl(PR_SET_TIMERSLACK, context->timer_slack_nsec) < 0) { err = -errno; r = EXIT_TIMERSLACK; @@ -1494,6 +1494,7 @@ void exec_context_init(ExecContext *c) { c->send_sigkill = true; c->control_group_persistent = -1; c->ignore_sigpipe = true; + c->timer_slack_nsec = (nsec_t) -1; } void exec_context_done(ExecContext *c) { @@ -1739,7 +1740,7 @@ void exec_context_dump(ExecContext *c, FILE* f, const char *prefix) { fputs("\n", f); } - if (c->timer_slack_nsec_set) + if (c->timer_slack_nsec != (nsec_t) -1) fprintf(f, "%sTimerSlackNSec: %lu\n", prefix, c->timer_slack_nsec); fprintf(f, |