]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(pthread_cancel): Use the result of __pthread_kill.
authorUlrich Drepper <drepper@redhat.com>
Sun, 16 Feb 2003 08:52:22 +0000 (08:52 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 16 Feb 2003 08:52:22 +0000 (08:52 +0000)
nptl/pthread_cancel.c

index 0dd97a27e52bd1c36793f856168034ec9c26fc1d..153cb198d82a0f0743e6ada2b432081c4e6950c4 100644 (file)
@@ -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;
 }