From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,c636cda4fa79bbaf X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2003-10-14 06:04:13 PST Message-ID: <3f8bf44d@usenet01.boi.hp.com> From: David Butenhof Subject: Re: pthread_kill problem????? Newsgroups: comp.unix.tru64 Reply-To: David.Butenhof@hp.com Date: Tue, 14 Oct 2003 09:04:06 -0400 References: Organization: Hewlett-Packard Company User-Agent: KNode/0.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit NNTP-Posting-Host: kalkin.zko.dec.com X-Trace: usenet01.boi.hp.com 1066136653 16.31.48.112 (14 Oct 2003 07:04:13 -0600) Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news.he.net!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!usenet01.boi.hp.com!not-for-mail Xref: archiver1.google.com comp.unix.tru64:10822 Ron Harter wrote: > The debugger says that program was executing in the pthread_kill > function when it got an abort. a) define "abort". As I've said before, in response to your other (disconnected) postings and and email, the most likely explanation is a memory corruption; but you haven't given enough information to be sure. > We need to be > able to reliably determine if the communication thread is still available > for use which is why we are calling pthread_kill(thread_id, 0) As I believe I've also said, the result of pthread_kill(thread_id,0) is NOT a reliable indication of whether the "thread is still available for use". It only indicates whether thread_id contains a value that represents a thread that currently exists. It does not care whether that ID was generated for a thread that once existed, terminated, and was reissued to a new thread. It doesn't care whether the thread is RUNNING or has terminated and not yet been joined. It only cares whether the ID is valid. This is probably not what you want if you are trying to determine whether a thread is "available for use". -- /--------------------[ David.Butenhof@hp.com ]--------------------\ | Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect | | My book: http://www.awl.com/cseng/titles/0-201-63392-2/ | \----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/