[Bug 191906] New: pthread_cancel(NULL) on FreeBSD returns EINVAL, not ESRCH according to manpage
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jul 17 03:13:02 UTC 2014
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 at FreeBSD.org
Reporter: yaneurabeya at 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.
More information about the freebsd-standards
mailing list