Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jan 2015 00:53:24 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-standards@FreeBSD.org
Subject:   [Bug 191906] pthread_cancel(NULL) on FreeBSD returns EINVAL, not ESRCH according to manpage
Message-ID:  <bug-191906-15-bnsqqVxVrU@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-191906-15@https.bugs.freebsd.org/bugzilla/>
References:  <bug-191906-15@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191906

Garrett Cooper,425-314-3911 <ngie@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress
                 CC|                            |freebsd-testing@freebsd.org
           Assignee|freebsd-standards@FreeBSD.o |ngie@FreeBSD.org
                   |rg                          |

--- Comment #4 from Garrett Cooper,425-314-3911 <ngie@FreeBSD.org> ---
Easy fix:

        /*
         * As usual, ESRCH should follow if
         * we try to detach an invalid thread.
         */

+#ifdef __NetBSD__
        rv = pthread_cancel(NULL);
+#else
+       rv = pthread_cancel(t);
+#endif
        ATF_REQUIRE(rv == ESRCH);
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-191906-15-bnsqqVxVrU>