From fb304035c41c7ee2afede51e5e8568974549ba5e Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Wed, 25 Nov 2015 01:09:13 +0100 Subject: [PATCH] Fix RPC breakage when longjumping from signal handler * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Destroy reply port of interrupted RPC instead of restoring it. --- ChangeLog | 5 +++++ hurd/sigunwind.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 343a936105..33ea5ab374 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-11-25 Samuel Thibault + + * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Destroy reply port + of interrupted RPC instead of restoring it. + 2015-11-24 Joseph Myers * stdlib/strtod_nan.c: New file. diff --git a/hurd/sigunwind.c b/hurd/sigunwind.c index 3a62fb5fb9..800bb306f5 100644 --- a/hurd/sigunwind.c +++ b/hurd/sigunwind.c @@ -50,7 +50,8 @@ _hurdsig_longjmp_from_handler (void *data, jmp_buf env, int val) *reply_port = MACH_PORT_DEAD; __mach_port_destroy (__mach_task_self (), port); } - *reply_port = scp->sc_reply_port; + if (scp->sc_reply_port) + __mach_port_destroy (__mach_task_self (), scp->sc_reply_port); } __spin_lock (&ss->lock); -- 2.11.4.GIT