ret = waitpid(consumer_data->pid, &status, 0);
if (ret == -1) {
PERROR("consumerd waitpid pid: %d", consumer_data->pid)
- }
- if (!WIFEXITED(status)) {
+ } else if (!WIFEXITED(status)) {
ERR("consumerd termination with error: %d",
WEXITSTATUS(ret));
}
if (notification_thread_handle) {
notification_thread_command_quit(notification_thread_handle);
notification_thread_handle_destroy(notification_thread_handle);
- }
- ret = pthread_join(notification_thread, &status);
- if (ret) {
- errno = ret;
- PERROR("pthread_join notification thread");
- retval = -1;
+ ret = pthread_join(notification_thread, &status);
+ if (ret) {
+ errno = ret;
+ PERROR("pthread_join notification thread");
+ retval = -1;
+ }
}
rcu_thread_offline();