Date: Fri, 21 Jul 2000 13:46:39 -0400 (EDT) From: Eran Gabber <eran@research.bell-labs.com> To: Tan Juay Kwang <jk.tan@pacific.net.sg> Cc: freebsd-questions@FreeBSD.ORG Subject: RE: pthreads on 4.0-STABLE Message-ID: <Pine.GSO.3.96.1000721133932.10644A-100000@aura.research.bell-labs.com> In-Reply-To: <NEBBLKHLGDECFCNMHPEEEEAMCPAA.jk.tan@pacific.net.sg>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 22 Jul 2000, Tan Juay Kwang wrote: > When I tried it on RedHat 6.2, I found that all my threads appears as > different processes under ps(1), which is due to the implementation of the > linux threads. Then I realized that I can kill off one of them without > taking down the entire process. The killed off thread will appear as > <defunct> under ps(1). I'm rather baffled by this behavior since I've > always thought that you can't 'kill' a thread within a process by another > process, in this case, kill(1). > > However, most of the time, killing off 1 thread does take down the entire > process. You should NOT kill individual threads by killing their processes. If you do so, you will probably corrupt some internal data structures of the thread library. You should use pthread_kill(3) or pthread_cancel(3) to terminate individual threads within the application. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.3.96.1000721133932.10644A-100000>