Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!pnx.dk!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: Fri, 16 Dec 2011 03:40:19 +0000 Lines: 17 Message-ID: <87zket5gm4.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 7nLB8l4/U0Biolqvi8n1Gw64BWy7A7oCnrSuZL6LOBE6vBrB4= Cancel-Lock: sha1:E1yYjqXYkH+yNixZMiLae8GDx5k= sha1:qGny7pPlFEwH8pyawD8CuPBz5B0= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:331 Bill M writes: > Mark wrote, On 12/15/2011 9:19 AM: >> 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. > > Do I need to have a sigaction sa_handler for each thread? Which part of "you are wrong and this is NOT necessary" is too complicated for you?