request_list.c:rl_free_entry() bad pthread_kill()?
Alan DeKok
aland at nitros9.org
Wed May 10 19:01:59 CEST 2006
Frank Cusack <fcusack at fcusack.com> wrote:
> What is the intent of the pthread_kill() in rl_free_entry()? AFAICT,
> child_pid is not in fact a *child* pid, it's a thread id. And in fact,
> in order for pthread_kill() to work at all, this *must* be the case.
Yes.
> So the reason for my question is that sending SIGKILL to any thread in
> the process does NOT terminate that thread, it terminates the entire
> process.
OK.
> The only way to force a [POSIX] thread to terminate is to use cancellation,
> which is complex and would require significant updates to all modules if
> the intent of this code is to abort any current processing "now"-ish.
The CVS head has a "stop now" flag, which causes src/main/modcall.c
to stop processing the request. If the blocked module can be
convinced to return, then the thread should be available for other
requests.
But some client libraries are notorious for blocking and never
returning to the caller when things go wrong. There's little the
server can do in that case.
Alan DeKok.
More information about the Freeradius-Devel
mailing list