mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 17:10:48 +00:00
fix oob data poll
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12244 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8718555c9a
commit
7f518f917a
2 changed files with 7 additions and 3 deletions
|
@ -92,7 +92,7 @@ typedef enum {
|
|||
ET_RDESC, /* Watch for descriptor becoming readable. */
|
||||
ET_WDESC, /* Watch for descriptor becoming writeable. */
|
||||
ET_RPORT, /* Watch for message arriving on port. */
|
||||
ET_EDESC /* Watch for descriptor with exception data. */
|
||||
ET_EDESC /* Watch for descriptor with out-of-band data. */
|
||||
} RunLoopEventType;
|
||||
|
||||
@protocol RunLoopEvents
|
||||
|
|
|
@ -618,7 +618,7 @@ static void setPollfd(int fd, int event, GSRunLoopCtxt *ctxt)
|
|||
fd = (int)info->data;
|
||||
if (fd > end_inputs)
|
||||
end_inputs = fd;
|
||||
setPollfd(fd, POLLERR, self);
|
||||
setPollfd(fd, POLLPRI, self);
|
||||
NSMapInsert(_efdMap, (void*)fd, info);
|
||||
num_inputs++;
|
||||
break;
|
||||
|
@ -779,7 +779,7 @@ if (0) {
|
|||
GSRunLoopWatcher *watcher;
|
||||
BOOL found = NO;
|
||||
|
||||
if (pollfds[fdIndex].revents & (POLLERR | POLLHUP | POLLNVAL))
|
||||
if (pollfds[fdIndex].revents & (POLLPRI|POLLERR|POLLHUP|POLLNVAL))
|
||||
{
|
||||
watcher = (GSRunLoopWatcher*)NSMapGet(_efdMap,
|
||||
(void*)fd);
|
||||
|
@ -835,6 +835,10 @@ if (0) {
|
|||
}
|
||||
found = YES;
|
||||
}
|
||||
/*
|
||||
* The poll() call supports various error conditions - all
|
||||
* errors should be handled by the 'read' event handler.
|
||||
*/
|
||||
if (pollfds[fdIndex].revents & POLLIN)
|
||||
{
|
||||
watcher = (GSRunLoopWatcher*)NSMapGet(_rfdMap,
|
||||
|
|
Loading…
Reference in a new issue