Avoid non-blocking I/O

This commit is contained in:
topjohnwu 2022-05-30 01:21:38 -07:00
parent 18acb97dfe
commit 5e6eb8dd01

View File

@ -217,7 +217,8 @@ int app_request(const su_context &ctx) {
exec_cmd("request", extras, ctx.info, false); exec_cmd("request", extras, ctx.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 | O_NONBLOCK); // Open with O_RDWR to prevent FIFO open block
int fd = xopen(fifo, O_RDWR | O_CLOEXEC);
struct pollfd pfd = { struct pollfd pfd = {
.fd = fd, .fd = fd,
.events = POLLIN .events = POLLIN