Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.os.linux.development.apps Subject: Re: threading question Date: Thu, 15 Dec 2011 15:42:43 +0000 Lines: 15 Message-ID: <877h1xyh70.fsf@sapphire.mobileactivedefense.com> References: <8762hjp32c.fsf@sapphire.mobileactivedefense.com> <87wr9znmds.fsf@sapphire.mobileactivedefense.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net qcmDWFX1BdRaRBkt6hPOhgLQ8Alxpg/G5QSShbN8ziWCifjZM= Cancel-Lock: sha1:G8rVxpburSrQNq1mbmCRRKK2xvs= sha1:hQ1r4Qr5Bnq385POEeHwuqMeB7E= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:327 Mark writes: > On Wed, 14 Dec 2011 11:12:29 -0600, Bill M > wrote: > >>Let me ask my question a different way: What is the proper method of >>cleaning up threads before the main routine exits? If your previous >>response answers that question, maybe you could reform your response? > > Ensure that all the threads can respond to a termination request. > Send a termination request to all threads. > Call pthread_join() for each thread. There is no required cleanup when a multithreaded process exits, especially none which would require collecting a return value from each thread.