Date: Thu, 17 Jul 2014 03:13:01 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 191906] New: pthread_cancel(NULL) on FreeBSD returns EINVAL, not ESRCH according to manpage Message-ID: <bug-191906-15@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191906 Bug ID: 191906 Summary: pthread_cancel(NULL) on FreeBSD returns EINVAL, not ESRCH according to manpage Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: yaneurabeya@gmail.com According to pthread_cancel(3) and opengroup, pthread_cancel should only return ESRCH, not EINVAL (but it apparently returns EINVAL for thread=NULL). Found with the NetBSD libthr ATF testcases. % cc -lpthread -Wall -o /root/test_pthread_cancel /root/test_pthread_cancel.c % /root/test_pthread_cancel Invalid argument % cat /root/test_pthread_cancel.c #include <pthread.h> #include <stdio.h> #include <string.h> int main(void) { int rv = pthread_cancel(NULL); printf("%s\n", strerror(rv)); return (0); } -- 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>