Re: missing madvise functionality

William Lee Irwin III
2007-04-04T13:38:46Z

On Wed, Apr 04, 2007 at 06:09:18AM -0700, William Lee Irwin III wrote:
> for (--i; i >= 0; --i) {
> if (pthread_join(th[i], NULL)) {
> perror("main: pthread_join failed");
> ret = EXIT_FAILURE;
> }
> }

Obligatory brown paper bag patch:

--- ./jakub.c.orig 2007-04-04 05:57:23.409493248 -0700
+++ ./jakub.c 2007-04-04 06:35:34.296043432 -0700
@@ -232,10 +232,14 @@ int main(int argc, char *argv[])
}
}
for (--i; i >= 0; --i) {
- if (pthread_join(th[i], NULL)) {
+ void *status;
+
+ if (pthread_join(th[i], &status)) {
perror("main: pthread_join failed");
ret = EXIT_FAILURE;
}
+ if (status != (void *)tr_success)
+ ret = EXIT_FAILURE;
}
free(th);
getrusage(RUSAGE_SELF, &ru);

-- wli