@@ -89,10 +89,14 @@ static int get_fd_dispatchable_events (BFileDescriptor *bfd)
ev |= BREACTOR_WRITE;
}
- if ((bfd->pollfd.revents & G_IO_ERR) || (bfd->pollfd.revents & G_IO_HUP)) {
+ if ((bfd->pollfd.revents & G_IO_ERR)) {
ev |= BREACTOR_ERROR;
+ if ((bfd->pollfd.revents & G_IO_HUP)) {
+ ev |= BREACTOR_HUP;
+ }
+
return ev;
@@ -62,6 +62,7 @@ struct BFileDescriptor_t;
#define BREACTOR_READ (1 << 0)
#define BREACTOR_WRITE (1 << 1)
#define BREACTOR_ERROR (1 << 2)
+#define BREACTOR_HUP (1 << 3)
typedef void (*BFileDescriptor_handler) (void *user, int events);