diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 00:08:26 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-02-11 00:08:26 +0100 |
commit | a92daf40345f6044fc66801495ad05d3d9d4ad31 (patch) | |
tree | c5cad5b1ecb749310bf4661ada6b1273d48803ca /hurd | |
parent | 3eb2a4768ef188eead2f9678129377c5033ad1e4 (diff) | |
parent | bee39b8ad09540f2f630da0d2ba93b6067d7915b (diff) |
Merge branch 't/select-EINTR' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'hurd')
-rw-r--r-- | hurd/hurdselect.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hurd/hurdselect.c b/hurd/hurdselect.c index a02c7bed97..e616ac1dcf 100644 --- a/hurd/hurdselect.c +++ b/hurd/hurdselect.c @@ -332,7 +332,7 @@ _hurd_select (int nfds, mach_msg_option_t options = (timeout == NULL ? 0 : MACH_RCV_TIMEOUT); error_t msgerr; while ((msgerr = __mach_msg (&msg.head, - MACH_RCV_MSG | options, + MACH_RCV_MSG | MACH_RCV_INTERRUPT | options, 0, sizeof msg, portset, to, MACH_PORT_NULL)) == MACH_MSG_SUCCESS) { @@ -411,6 +411,9 @@ _hurd_select (int nfds, effect a poll, so ERR is MACH_RCV_TIMED_OUT when the poll finds no message waiting. */ err = 0; + if (msgerr == MACH_RCV_INTERRUPTED) + /* Interruption on our side (e.g. signal reception). */ + err = EINTR; if (got) /* At least one descriptor is known to be ready now, so we will |