title: pthread - How to start running a new thread without calling join?
body: <p>I want to start a new thread from the main thread. I can't use join since I don't want to wait for the thread to exit and than resume execution.<br>
  Basically what I need is something like pthread_start(...), can't find it though.</p>
  
  <p>Edit:<br>
  As all of the answers suggested create_thread should start thread the problem is that in the simple code below it doesn't work. The output of the program below is "main thread". It seems like the sub thread never executed. Any idea where I'm wrong?<br>
  compiled and run on Fedora 14 GCC version 4.5.1</p>
  
  <pre><code>void *thread_proc(void* x)
  {
     printf ("sub thread.\n");
     pthread_exit(NULL);
  }
  
  
  int main()
  {
      pthread_t t1;
      int res = pthread_create(&amp;t1, NULL, thread_proc, NULL);
      if (res)
      {
          printf ("error %d\n", res);
      }
  
      printf("main thread\n");
      return 0;
  }
  </code></pre>