- if (handler_ctx->daemon_pid == 0) {
- goto out_crashed;
- } else {
- kill(handler_ctx->daemon_pid, 0);
- if (errno == ESRCH) {
- goto out_crashed;
- } else {
- DEBUG("Filesystem daemon is still alive... "
- "Waiting another %d seconds\n",
- handler_ctx->hdr.timeout_seconds);
- return 0;
- }
+ if (handler_ctx->daemon_pid == 0 ||
+ (kill(handler_ctx->daemon_pid, 0) != 0 && errno == ESRCH))
+ {
+ ERROR("The filesystem daemon has crashed! Changes to the "
+ "WIM may not have been commited.");
+ return WIMLIB_ERR_FILESYSTEM_DAEMON_CRASHED;