mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-25 21:30:49 +00:00
Fix app request fifo wait
This commit is contained in:
parent
71e37345b4
commit
666ab1941f
@ -215,10 +215,10 @@ int app_request(const shared_ptr<su_info> &info) {
|
|||||||
exec_cmd("request", extras, info, false);
|
exec_cmd("request", extras, info, false);
|
||||||
|
|
||||||
// Wait for data input for at most 70 seconds
|
// Wait for data input for at most 70 seconds
|
||||||
int fd = xopen(fifo, O_RDONLY | O_CLOEXEC);
|
int fd = xopen(fifo, O_RDONLY | O_CLOEXEC | O_NONBLOCK);
|
||||||
struct pollfd pfd = {
|
struct pollfd pfd = {
|
||||||
.fd = fd,
|
.fd = fd,
|
||||||
.events = POLL_IN
|
.events = POLLIN
|
||||||
};
|
};
|
||||||
if (xpoll(&pfd, 1, 70 * 1000) <= 0) {
|
if (xpoll(&pfd, 1, 70 * 1000) <= 0) {
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user