about summary refs log tree commit diff
path: root/nptl/pthread_cancel.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_cancel.c')
-rw-r--r--nptl/pthread_cancel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c
index 0dd97a27e5..153cb198d8 100644
--- a/nptl/pthread_cancel.c
+++ b/nptl/pthread_cancel.c
@@ -27,6 +27,7 @@ pthread_cancel (th)
      pthread_t th;
 {
   volatile struct pthread *pd = (volatile struct pthread *) th;
+  int result = 0;
 
   while (1)
     {
@@ -49,7 +50,7 @@ pthread_cancel (th)
 
 	  /* The cancellation handler will take care of marking the
 	     thread as canceled.  */
-	  __pthread_kill (th, SIGCANCEL);
+	  result = __pthread_kill (th, SIGCANCEL);
 
 	  break;
 	}
@@ -61,5 +62,5 @@ pthread_cancel (th)
 	break;
     }
 
-  return 0;
+  return result;
 }