diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-12-04 21:09:31 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-12-04 21:09:31 +0100 |
commit | 7ae192043ba1c743e49b9fec6d15c9a6d62b899f (patch) | |
tree | 7e4c961261cff9b79c360851fcb9351bcda212c6 | |
parent | beea52f48c1ba181cd8c7444b321d16a38e9ef53 (diff) | |
parent | a5401cd5b84dfa53152d0ae874f0f01f5462b412 (diff) |
Merge commit 'refs/top-bases/t/eintr' into t/eintr
-rw-r--r-- | hurd/hurdselect.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index e9e9b3e85b..dcda71b63f 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -288,7 +288,9 @@ _hurd_select (int nfds, portset = MACH_PORT_NULL; for (i = firstfd; i <= lastfd; ++i) - if (d[i].type & ~SELECT_ERROR) + if (d[i].type & SELECT_ERROR) + d[i].reply_port = MACH_PORT_NULL; + else { int type = d[i].type; d[i].reply_port = __mach_reply_port (); @@ -491,7 +493,7 @@ _hurd_select (int nfds, if (firstfd != -1) for (i = firstfd; i <= lastfd; ++i) - if (d[i].type & ~(SELECT_ERROR | SELECT_RETURNED)) + if (d[i].reply_port != MACH_PORT_NULL) __mach_port_destroy (__mach_task_self (), d[i].reply_port); if (firstfd == -1 || (firstfd != lastfd && portset != MACH_PORT_NULL)) /* Destroy PORTSET, but only if it's not actually the reply port for a |