mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-13 05:33:51 -04:00
terminal: 'child_ret' variables isn't needed
This commit is contained in:
parent
f28fb6c039
commit
563c910127
1 changed files with 3 additions and 5 deletions
|
|
@ -627,18 +627,16 @@ term_destroy(struct terminal *term)
|
||||||
int status;
|
int status;
|
||||||
waitpid(term->slave, &status, 0);
|
waitpid(term->slave, &status, 0);
|
||||||
|
|
||||||
int child_ret = EXIT_FAILURE;
|
ret = EXIT_FAILURE;
|
||||||
if (WIFEXITED(status)) {
|
if (WIFEXITED(status)) {
|
||||||
child_ret = WEXITSTATUS(status);
|
ret = WEXITSTATUS(status);
|
||||||
LOG_DBG("slave exited with code %d", child_ret);
|
LOG_DBG("slave exited with code %d", child_ret);
|
||||||
} else if (WIFSIGNALED(status)) {
|
} else if (WIFSIGNALED(status)) {
|
||||||
child_ret = WTERMSIG(status);
|
ret = WTERMSIG(status);
|
||||||
LOG_WARN("slave exited with signal %d", child_ret);
|
LOG_WARN("slave exited with signal %d", child_ret);
|
||||||
} else {
|
} else {
|
||||||
LOG_WARN("slave exited for unknown reason (status = 0x%08x)", status);
|
LOG_WARN("slave exited for unknown reason (status = 0x%08x)", status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = child_ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(term);
|
free(term);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue