GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 31-Jul-2008, 05:31
deepti_v deepti_v is offline
New Member
 
Join Date: Mar 2008
Posts: 6
deepti_v has a little shameless behaviour in the past

SIGTERM to main process does not kill detached threads!! :(


Hi,

I am stuck up with a strange problem.
I am writing an application - a kinda tracker that reads data from memcache and invokes theads to process each record of the memcache.

I dont want to join all my threads because my tracker should poll the cache in regular intervals say sum 300 seconds without waiting for the child thread completion.

To accomplish the above task, I created a detachable tracker thread for each poll of memcache which in turn creates worker threads n joins them.

so my main tracker thread need not wait for the detached thread and can start polling the cache at a stipulated time.

Now, when i tried to give a "kill <process_id>", i observed that only my main thread is killed whereas the detached thread and worker threads are still running!!!

Ideally , a kill to main should quit all my detached threads too...
I am unable to understand why SIGTERM is failing to kill the detached threads and ne ideas/thoughts on how to handle this?? Kindly help
 
 

Recent GIDBlogProblems with the Navy (Chiefs) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help in bitwise counting Stream C Programming Language 7 04-Oct-2006 16:07
How to kill a process... djecko_vk C++ Forum 2 03-Aug-2005 04:39
[TUTORIAL] Calling an external program in C (Linux) dsmith C Programming Language 4 22-Apr-2005 14:30
apache php no longer working (MX??) XP?? ChicoMendez Apache Web Server Forum 5 30-Aug-2004 11:51
Apache2 config issues monev Apache Web Server Forum 2 28-Jun-2004 07:19

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 01:39.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.