This reverts commit
f87d72f5c5bff0837d409a56bd34f439a90119ca as that is
part of a patchset reported to break cleanup and migration.
Cc: Gal Hammer <ghammer@redhat.com>
Cc: Sitong Liu <siliu@redhat.com>
Cc: Xiaoling Gao <xiagao@redhat.com>
Suggested-by: Greg Kurz <groug@kaod.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reported-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reported-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
int rfd;
int wfd;
#endif
- void (*cleanup)(EventNotifier *);
};
typedef void EventNotifierHandler(EventNotifier *);
{
e->rfd = fd;
e->wfd = fd;
- e->cleanup = NULL;
}
#endif
e->rfd = fds[0];
e->wfd = fds[1];
}
- e->cleanup = NULL;
if (active) {
event_notifier_set(e);
}
{
if (e->rfd != e->wfd) {
close(e->rfd);
+ e->rfd = -1;
}
close(e->wfd);
- e->rfd = -1;
e->wfd = -1;
- e->cleanup = NULL;
}
int event_notifier_get_fd(const EventNotifier *e)
{
e->event = CreateEvent(NULL, TRUE, FALSE, NULL);
assert(e->event);
- e->cleanup = NULL;
return 0;
}
{
CloseHandle(e->event);
e->event = NULL;
- e->cleanup = NULL;
}
HANDLE event_notifier_get_handle(EventNotifier *e)