Merge branch 'check_return' into 'master'
unl0kr-agent: check exit code of a child process See merge request postmarketOS/buffybox!53
This commit is contained in:
@@ -458,9 +458,9 @@ int exec_unl0kr(char** ret_password)
|
|||||||
goto exit2;
|
goto exit2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WIFEXITED(status)) {
|
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
|
||||||
ret = ECHILD;
|
ret = ECHILD;
|
||||||
fprintf(stderr, "unl0kr terminated abnormally\n");
|
fprintf(stderr, "unl0kr is failed\n");
|
||||||
goto exit2;
|
goto exit2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user