pthread_kill ESRCH
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libpthread-stubs (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Man page of pthread_kill:
...
The pthread_kill function returns the following error codes on error:
ESRCH the thread thread does not exist (e.g. it has already
Compile and run the following program (errkill.c):
#include <pthread.h>
#include <stdio.h>
#include <string.h>
void* victim(void* data){
return NULL;
}
main (){
pthread_t th;
int err;
pthread_
pthread_
if (err = pthread_kill(th,0) != 0){
}
}
$ gcc errkill.c -o errkill.exe -lpthread
$ ./errkill.exe
pthread_kill Operation not permitted
I.e. pthread_kill returns EPERM instead of ESRCH
Then, either the documentation or the library function is wrong.
I think that ESRCH is the correct error to report.
Ubuntu version: 9.04
Thank you for reporting this issue. Can you tell me what application this is you are building? Where did it come from? If I have never tried this application, what steps do I follow to get this bug to reproduce for me?
Thanks again.