The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 04-30-2008
mariaro mariaro is offline
Registered User
 

Join Date: Apr 2008
Posts: 2
I'm rewriting my post... It seems it got lost somehow.

Check the line while(--count). The "While" loop will exit when count is 1, as --count is evaluated to 0, so the child from childpids[0] isn't killed.

You can simply replace the "while" line with:
for(count-=1; count >= 0; count--)

Best regards!
Reply With Quote