summaryrefslogtreecommitdiff
path: root/debian/patches/libpthread_kill_0.patch
blob: 4aa307dc84f223f1bd10eb24a4318961ee38a097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
commit fb30b6bbf28d91667dcb9691dfeefffac4f99b82
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Oct 18 00:24:19 2009 +0200

    Fix pthread_kill(thread, 0)
    
    * sysdeps/hurd/pt-kill.c (pthread_kill): Return immediately after checks
    without calling _hurd_raise_signal if sig is 0.

---
 libpthread/sysdeps/hurd/pt-kill.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/libpthread/sysdeps/hurd/pt-kill.c
+++ b/libpthread/sysdeps/hurd/pt-kill.c
@@ -39,6 +39,9 @@ pthread_kill (pthread_t thread, int sig)
   ss = _hurd_thread_sigstate (pthread->kernel_thread);
   assert (ss);
 
+  if (!sig)
+    return 0;
+
   detail.exc = 0;
   detail.code = sig;
   detail.error = 0;