Skip to content
Extraits de code Groupes Projets

Resolve "Import the "Favoris" from kurisu"

Fusionnées Kubat a demandé de fusionner plt-import vers master
1 file
+ 7
6
Comparer les modifications
  • Côte à côte
  • En ligne
+ 7
6
@@ -66,14 +66,12 @@ mkvpropedit__(const char *const args[])
@@ -66,14 +66,12 @@ mkvpropedit__(const char *const args[])
if ((pid = fork()) == 0) {
if ((pid = fork()) == 0) {
if ((fd = open("/dev/null", O_WRONLY | O_TRUNC)) < 0) {
if ((fd = open("/dev/null", O_WRONLY | O_TRUNC)) < 0) {
LOG_ERROR("FORK", "Can't to open /dev/null "
LOG_ERROR("FORK", "Can't to open /dev/null in O_WRONLY O_TRUNC");
"in O_WRONLY O_TRUNC");
return false;
return false;
}
}
if (dup2(fd, 1) < 0) {
if (dup2(fd, 1) < 0) {
LOG_ERROR("FORK", "Failed to duplicate "
LOG_ERROR("FORK", "Failed to duplicate /dev/null to stdout");
"/dev/null to stdout");
return false;
return false;
}
}
@@ -89,14 +87,17 @@ mkvpropedit__(const char *const args[])
@@ -89,14 +87,17 @@ mkvpropedit__(const char *const args[])
else {
else {
do {
do {
if (waitpid(pid, &wstatus, WUNTRACED | WCONTINUED) == -1) {
if (waitpid(pid, &wstatus, WUNTRACED | WCONTINUED) == -1) {
LOG_ERROR("FORK", "Failed to wait children: %s",
LOG_ERROR("FORK", "Failed to wait children: %s", strerror(errno));
strerror(errno));
return false;
return false;
}
}
} while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));
} while (!WIFEXITED(wstatus) && !WIFSIGNALED(wstatus));
if ((status = WEXITSTATUS(wstatus))) {
if ((status = WEXITSTATUS(wstatus))) {
LOG_ERROR("FORK", "Children failed with status %d", status);
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;
return false;
}
}
}
}
Chargement en cours