From owner-freebsd-threads@FreeBSD.ORG Fri Mar 9 20:00:18 2007 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 28D7416A412; Fri, 9 Mar 2007 20:00:18 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from rusty.kulnet.kuleuven.ac.be (rusty.kulnet.kuleuven.ac.be [134.58.240.42]) by mx1.freebsd.org (Postfix) with ESMTP id D741413C4A7; Fri, 9 Mar 2007 20:00:17 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from localhost (localhost [127.0.0.1]) by rusty.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 039EC1D78A7; Fri, 9 Mar 2007 21:00:17 +0100 (CET) Received: from smtp02.kuleuven.be (lepidus.kulnet.kuleuven.ac.be [134.58.240.72]) by rusty.kulnet.kuleuven.ac.be (Postfix) with ESMTP id DFE101D7607; Fri, 9 Mar 2007 21:00:15 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtp02.kuleuven.be (Postfix) with ESMTP id 16ED92CAB1E; Fri, 9 Mar 2007 21:00:13 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.8/8.13.8) with ESMTP id l29K0Cat003258; Fri, 9 Mar 2007 21:00:12 +0100 (CET) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-threads@freebsd.org Date: Fri, 9 Mar 2007 21:00:08 +0100 User-Agent: KMail/1.9.5 References: <200703091515.27133.tijl@ulyssis.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703092100.12199.tijl@ulyssis.org> X-Virus-Scanned: by KULeuven Antivirus Cluster Cc: Daniel Eischen , gerald@freebsd.org Subject: Re: signalling remote threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2007 20:00:18 -0000 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...