mirror of git://sourceware.org/git/glibc.git
hurd: Return EIO on non-responding interrupted servers
since we do not actually know whether the RPC was completed or not, which makes a huge difference for e.g. write(), so better really error out than letting caller think that the RPC did not happen. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): When the server does not answer to interrupt_operation, return EIO instead of EINTR.
This commit is contained in:
parent
46a7f24c84
commit
2d0d1d3876
|
@ -1,6 +1,8 @@
|
||||||
2018-10-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
2018-10-28 Samuel Thibault <samuel.thibault@ens-lyon.org>
|
||||||
|
|
||||||
* hurd/hurdsig.c (_hurd_interrupted_rpc_timeout): Set to 60000.
|
* hurd/hurdsig.c (_hurd_interrupted_rpc_timeout): Set to 60000.
|
||||||
|
* hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): When the server does not
|
||||||
|
answer to interrupt_operation, return EIO instead of EINTR.
|
||||||
|
|
||||||
2018-10-26 Joseph Myers <joseph@codesourcery.com>
|
2018-10-26 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
|
||||||
else
|
else
|
||||||
/* The operation was supposedly interrupted, but still has
|
/* The operation was supposedly interrupted, but still has
|
||||||
not returned. Declare it interrupted. */
|
not returned. Declare it interrupted. */
|
||||||
goto interrupted;
|
goto dead;
|
||||||
|
|
||||||
case MACH_SEND_INTERRUPTED: /* RPC didn't get out. */
|
case MACH_SEND_INTERRUPTED: /* RPC didn't get out. */
|
||||||
if (!(option & MACH_SEND_MSG))
|
if (!(option & MACH_SEND_MSG))
|
||||||
|
@ -324,17 +324,21 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
|
||||||
timeout = user_timeout;
|
timeout = user_timeout;
|
||||||
goto message;
|
goto message;
|
||||||
}
|
}
|
||||||
/* FALLTHROUGH */
|
err = EINTR;
|
||||||
|
|
||||||
|
/* The EINTR return indicates cancellation, so clear the flag. */
|
||||||
|
ss->cancel = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
case MACH_RCV_PORT_DIED:
|
case MACH_RCV_PORT_DIED:
|
||||||
/* Server didn't respond to interrupt_operation,
|
/* Server didn't respond to interrupt_operation,
|
||||||
so the signal thread destroyed the reply port. */
|
so the signal thread destroyed the reply port. */
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
interrupted:
|
dead:
|
||||||
err = EINTR;
|
err = EIO;
|
||||||
|
|
||||||
/* The EINTR return indicates cancellation, so clear the flag. */
|
/* The EIO return indicates cancellation, so clear the flag. */
|
||||||
ss->cancel = 0;
|
ss->cancel = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue