From 099f8d2b7ecedc4f6fc895d2c35912f995289c24 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 11 Sep 2016 23:26:49 +0200 Subject: Fix spurious port destroy on io_select returning an error --- hurd/hurdselect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hurd/hurdselect.c') diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index cc697564ff..c86fdbcb16 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -491,7 +491,7 @@ _hurd_select (int nfds, if (firstfd != -1) for (i = firstfd; i <= lastfd; ++i) - if (d[i].type & ~SELECT_ERROR) + if (d[i].type & ~(SELECT_ERROR | SELECT_RETURNED)) __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 -- cgit v1.2.3