mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-29 12:00:42 +00:00
Do NOT exit event loop on timer/signal watcher error
This patch fixes a blocking issue discovered in the Finit project. At shutdown, or when there is any problem with a timer or signal watcher, the event loop is abruptly terminated. Instead of unconditionally exiting the event loop on problems with a single watcher, invalidate the watcher and run the callback one last time with UEV_ERROR in the events argument. This is a semantic change wrt. watchers and their callbacks, so the major version number will be bumped accordingly to signal the severity of this change. From now on it is STRONGLY recommended that each call back function check for UEV_ERROR. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
f3b3177963
commit
2f9cce9150
2 files changed
+16
-13
No files matched your search
+1
-1
@@ -38,7 +38,7 @@ typedef enum {
|
||||
} uev_type_t;
|
||||
|
||||
/* Event mask, used internally only. */
|
||||
#define UEV_EVENT_MASK (UEV_READ | UEV_WRITE | UEV_PRI | UEV_HUP | UEV_RDHUP | UEV_EDGE | UEV_ONESHOT)
|
||||
#define UEV_EVENT_MASK (UEV_ERROR | UEV_READ | UEV_WRITE | UEV_PRI | UEV_HUP | UEV_RDHUP | UEV_EDGE | UEV_ONESHOT)
|
||||
|
||||
/* Main libuEv context type */
|
||||
typedef struct {
|
||||
|
||||
Reference in new issue
Block a user