title: Can't terminate the thread using pthread_exit
body: <p>I cant terminate the thread, it keeps sending things even after I close the terminal...</p>
  
  <pre><code>void *RTPfun(void * client_addr);
  
  int main(int argc, char *argv[])
  {
     pthread_t RTPthread;
     pthread_create(&amp;RTPthread, NULL, &amp;RTPfun, (void*)client_addr);
     ...
     ...   
     pthread_exit(&amp;RTPfun);
     return 0;
   }
  
   void *RTPfun(void * client_addr)
   {
       ...
       ...
       return 0;
   }
  </code></pre>
  
  <p>Can someone tell me what am I doing wrong?
  Thanks!</p>