diff --git a/src/mkv/write.c b/src/mkv/write.c index 9429eba423a8916dadf2ca8d72eac09d1ce810be..fdbab5512ab0d1bb6ac0ad0670400b6f087bf8b6 100644 --- a/src/mkv/write.c +++ b/src/mkv/write.c @@ -66,14 +66,12 @@ mkvpropedit__(const char *const args[]) if ((pid = fork()) == 0) { if ((fd = open("/dev/null", O_WRONLY | O_TRUNC)) < 0) { - LOG_ERROR("FORK", "Can't to open /dev/null " - "in O_WRONLY O_TRUNC"); + LOG_ERROR("FORK", "Can't to open /dev/null in O_WRONLY O_TRUNC"); return false; } if (dup2(fd, 1) < 0) { - LOG_ERROR("FORK", "Failed to duplicate " - "/dev/null to stdout"); + LOG_ERROR("FORK", "Failed to duplicate /dev/null to stdout"); return false; } @@ -89,14 +87,17 @@ mkvpropedit__(const char *const args[]) else { do { if (waitpid(pid, &wstatus, WUNTRACED | WCONTINUED) == -1) { - LOG_ERROR("FORK", "Failed to wait children: %s", - strerror(errno)); + LOG_ERROR("FORK", "Failed to wait children: %s", strerror(errno)); return false; } } while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus)); if ((status = WEXITSTATUS(wstatus))) { LOG_ERROR("FORK", "Children failed with status %d", status); + if (status == 2) + LOG_ERROR("FORK", "Status 2 with mkvpropedit could means that karas are not valid MKV files"); + else if (status == 1) + LOG_WARN("FORK", "Status 1 on mkvpropedit means that it generated some warnings..."); return false; } }