summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-12-04 21:09:32 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-12-04 21:09:32 +0100
commit83d4ab99444b6f2526465ddbb309b0b1e18e83f1 (patch)
treef14500c331e62d1146f512b4485c50ed086cbb1d
parente4c8d49c656f0ccae3597e7d3c7d48365be81ee5 (diff)
parentb5f3eb17d63134a97a1a9a5d0e8105755710988c (diff)
Merge commit 'refs/top-bases/tschwinge/Roger_Whittaker' into tschwinge/Roger_Whittaker
-rw-r--r--hurd/hurdselect.c6
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