title: is exit command in multithread programming exit completely?
body: <p>I write a program with <code>C</code>. I have 3 threads which are working concurrently. (and for protecting the critical section I use semaphore). my program exit just in some situation (ending situation which provide <code>i=by</code> <code>if</code> command) which exist in thread number 2. with command:    <code>exit(-1)</code></p>
  
  <p>When I run my program in linux, when it arrives to this condition it exit completely. But I am still not sure if all other threads exit or not? and also if they remain in memory or not? someone told me they remain as Zombie and so it could harm the system, but when I look to processes (with <code>ps</code> command) I saw nothing. Now I need some help about the kind of ending the all thread and also look for zombies in my system.</p>