diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-12 20:44:50 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-13 00:49:16 +0200 |
commit | 6538a288be2a53d46570985e4b624323ee0f3aa9 (patch) | |
tree | 1bed9464e2822094b3762a9f0586240d6dd38454 | |
parent | 0cee4aa92f5b9b213856c8ba1ab84c34d73c943b (diff) | |
download | glibc-6538a288be2a53d46570985e4b624323ee0f3aa9.tar.gz glibc-6538a288be2a53d46570985e4b624323ee0f3aa9.tar.xz glibc-6538a288be2a53d46570985e4b624323ee0f3aa9.zip |
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.
-rw-r--r-- | sysdeps/mach/hurd/i386/sigreturn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c index 29c9629f45..4f19671069 100644 --- a/sysdeps/mach/hurd/i386/sigreturn.c +++ b/sysdeps/mach/hurd/i386/sigreturn.c @@ -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 |