If a child process dies from a signal, WIFEXITED() returns false and
WEXITSTATUS() isn't well-defined. In this case, if the client segfaults,
the status is 134 and WEXITSTATUS(134) is EXIT_SUCCESS, so we mask the error.
int status;
waitpid(-1, &status, 0);
- display->child_exit_status = WEXITSTATUS(status);
+ display->child_exit_status = status;
wl_display_terminate(display->display);
wl_event_source_remove(signal_source);
wl_display_destroy(display.display);
- assert(display.child_exit_status == EXIT_SUCCESS);
+ assert(WIFEXITED(display.child_exit_status) &&
+ WEXITSTATUS(display.child_exit_status) == EXIT_SUCCESS);
}