mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-31 12:20:29 +00:00
Fix #12: Implement workaround for application < foo.txt
This patch implements a workaround for issue #12, i.e. when an I/O watcher for redirected stdin is registered and causes epoll_ctl() to return EPERM. The workaround registers the watcher as `active = -1` and bypasses the epoll_wait() call in the main loop until all data has been read from stdin and the temporary -1 watcher(s) have completed. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
82a1018dd2
commit
e0cebc33b1
2 files changed
+52
-4
No files matched your search
@@ -46,6 +46,7 @@ typedef struct {
|
||||
int fd; /* For epoll() */
|
||||
uint32_t errors;
|
||||
LIST_HEAD(,uev) watchers;
|
||||
uint32_t workaround; /* For workarounds, e.g. redirected stdin */
|
||||
} uev_ctx_t;
|
||||
|
||||
/* Forward declare due to dependencys, don't try this at home kids. */
|
||||
|
||||
Reference in new issue
Block a user