signalling remote threads

Tijl Coosemans tijl at ulyssis.org
Fri Mar 9 20:00:18 UTC 2007


On Friday 09 March 2007 18:18, Daniel Eischen wrote:
> On Fri, 9 Mar 2007, Tijl Coosemans wrote:
> > Is it somehow possible to send a signal to a specific thread in
> > another process similar to the linux tkill and tgkill syscalls?
> >
> > I've seen the thr_kill call that takes an lwpid as argument, but
> > it can't send a signal to another process can it?
> 
> No, it is not possible and it shouldn't be possible
> as it's not portable.  From outside the process, you
> can send a signal to another _process_ (which will
> be delivered to one of its threads depending on
> their signal masks), but not to a specific thread
> in another process.

Ok, thanks. The reason I asked is because Wine uses this to let the
wineserver process (windows kernel) send signals to threads in a wine
process.

The only solution I see then is to have some sort of service thread in
the receiving process to dispatch the signal. That would be a portable
solution, but lots of work...


More information about the freebsd-threads mailing list