hurd: Restore destroying receive rights on sigreturn

Just subtracting a ref is making signal/tst-signal signal/tst-raise
signal/tst-minsigstksz-5 htl/tst-raise1 fail.
This commit is contained in:
Samuel Thibault 2023-04-12 20:44:50 +00:00
parent 0cee4aa92f
commit 6538a288be

View file

@ -102,8 +102,8 @@ __sigreturn (struct sigcontext *scp)
reply port in use by the thread when interrupted. */
reply_port = THREAD_GETMEM (THREAD_SELF, reply_port);
THREAD_SETMEM (THREAD_SELF, reply_port, scp->sc_reply_port);
__mach_port_mod_refs (__mach_task_self (), reply_port,
MACH_PORT_RIGHT_RECEIVE, -1);
if (MACH_PORT_VALID (reply_port))
__mach_port_destroy (__mach_task_self (), reply_port);
if (scp->sc_fpused)
/* Restore the FPU state. Mach conveniently stores the state