about summary refs log tree commit diff
path: root/hurd/sigunwind.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-25 01:09:13 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-11-25 01:09:13 +0100
commitfb304035c41c7ee2afede51e5e8568974549ba5e (patch)
tree88e86f66dde7ea65269460bfeed94891c2c8acaa /hurd/sigunwind.c
parente02cabecf0d025ec4f4ddee290bdf7aadb873bb3 (diff)
downloadglibc-fb304035c41c7ee2afede51e5e8568974549ba5e.tar.gz
glibc-fb304035c41c7ee2afede51e5e8568974549ba5e.tar.xz
glibc-fb304035c41c7ee2afede51e5e8568974549ba5e.zip
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.
Diffstat (limited to 'hurd/sigunwind.c')
-rw-r--r--hurd/sigunwind.c3
1 files changed, 2 insertions, 1 deletions
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);