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 -->
  #2 (permalink)  
Old 05-08-2008
ramen_noodle ramen_noodle is offline
Registered User
 

Join Date: Dec 2007
Location: Virginia, USA.
Posts: 232
The reason this is not working is that your main function doesn't have an event loop and/or doesn't block on the created thread.
An easy way out is to return the created thread tid, do not detach, and call pthread_join in main.

HTH.
Reply With Quote