X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftap%2Ftap.c;h=b3782104fb2b63274f2a97f0f94fac87cb1b9db3;hp=7c01e140d5c206c475957f439b47eb3462fff994;hb=HEAD;hpb=532feb88f516f0848ae0e3eaf3a89a1fc94db6c4 diff --git a/ccan/tap/tap.c b/ccan/tap/tap.c index 7c01e140..b3782104 100644 --- a/ccan/tap/tap.c +++ b/ccan/tap/tap.c @@ -43,6 +43,7 @@ static const char *todo_msg_fixed = "libtap malloc issue"; static int todo = 0; static int test_died = 0; static int test_pid; +void (*tap_fail_callback)(void) = NULL; /* Encapsulate the pthread code in a conditional. In the absence of libpthread the code does nothing. @@ -418,8 +419,8 @@ todo_end(void) UNLOCK; } -int -exit_status(void) +static int +exit_status_(void) { int r; @@ -446,3 +447,12 @@ exit_status(void) return r; } + +int +exit_status(void) +{ + int r = exit_status_(); + if (r > 255) + r = 255; + return r; +}