do_ppoll(fds, ufds);
}
stop_thread = 1;
- pthread_join(writer, NULL);
+ ret = pthread_join(writer, NULL);
+ if (ret) {
+ fprintf(stderr, "[error] pthread_join\n");
+ goto end;
+ }
end:
return;
}
(void *) epoll_event);
if (ret != 0) {
fprintf(stderr, "[error] pthread_create\n");
- goto end;
+ goto end_unmap;
}
ret = epoll_pwait(epollfd, epoll_event, 1, 1, NULL);
}
stop_thread = 1;
- pthread_join(writer, NULL);
-
+ ret = pthread_join(writer, NULL);
+ if (ret) {
+ fprintf(stderr, "[error] pthread_join\n");
+ goto end_unmap;
+ }
end_unmap:
for (i = 0; i < MAX_FDS; i++) {
ret = close(fds[i]);