Commit 5e6eb8dd authored by topjohnwu's avatar topjohnwu

Avoid non-blocking I/O

parent 18acb97d
...@@ -217,7 +217,8 @@ int app_request(const su_context &ctx) { ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment