mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-26 16:57:38 +00:00
Fix force denying on exit
This commit is contained in:
parent
30e459252c
commit
caa39474cb
3
su.c
3
su.c
@ -152,8 +152,7 @@ static void cleanup_signal(int sig) {
|
|||||||
__attribute__ ((noreturn)) void exit2(int status) {
|
__attribute__ ((noreturn)) void exit2(int status) {
|
||||||
// Handle the pipe, or the daemon will get stuck
|
// Handle the pipe, or the daemon will get stuck
|
||||||
if (su_ctx->pipefd[0] >= 0) {
|
if (su_ctx->pipefd[0] >= 0) {
|
||||||
int i = DENY;
|
xwrite(su_ctx->pipefd[1], &su_ctx->info->access.policy, sizeof(policy_t));
|
||||||
xwrite(su_ctx->pipefd[1], &i, sizeof(i));
|
|
||||||
close(su_ctx->pipefd[0]);
|
close(su_ctx->pipefd[0]);
|
||||||
close(su_ctx->pipefd[1]);
|
close(su_ctx->pipefd[1]);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user