Fall back to kill() if the kernel doesn't support tkill().

This commit is contained in:
Alexandre Julliard 2003-04-16 23:34:05 +00:00
parent d6da1f33ab
commit 3dddc114cf
1 changed files with 5 additions and 1 deletions

View File

@ -157,7 +157,11 @@ int send_thread_signal( struct thread *thread, int sig )
if (thread->unix_pid != -1)
{
if (thread->unix_tid != -1) ret = tkill( thread->unix_tid, sig );
if (thread->unix_tid != -1)
{
ret = tkill( thread->unix_tid, sig );
if (ret == -1 && errno == ENOSYS) ret = kill( thread->unix_pid, sig );
}
else ret = kill( thread->unix_pid, sig );
if (ret == -1 && errno == ESRCH) /* thread got killed */