title: New thread on invocation of timer_create()
body: <p>I am investigating how to get thread ID when the function timer_create() is called.
  I observed that everytime the timer_create() is called, a new thread (child thread of main process) is created. I verified this with ps -eL|grep </p>
  
  <p>I need to get the same TID (child thread ID) displayed by ps -eL inside my program which uses timer_create.
  From code below: How do I get the TID 18018 inside my program?</p>
  
  <p>I have researched all the posts and each one mentions that a new thread is created on calling the notification function and not calling timer_create().</p>
  
  <p>I appreciate your help very much!</p>
  
  <p>Code:</p>
  
  <pre><code>SLGTRACER_DEFINE(testMain, "testMain");
  
  
  timer_t audit_timer1;
  
  void timeoutHandler(sigval_t info)
  {
      slgInfo(testMain, "timeoutHandler invoked");
  
      slgInfo(testMain, "gettid() = %lu TESTMAIN", syscall(SYS_gettid));
      slgInfo(testMain, "getpid() = %d TESTMAIN", getpid());
  
  }
  
  int main(void)
  {
      slgInfo(testMain, "testMain Invoked");
  
  
      struct sigevent evp1;
      evp1.sigev_notify = SIGEV_THREAD;
      evp1.sigev_value.sival_ptr = &amp;audit_timer1;
      evp1.sigev_notify_function = timeoutHandler;
      evp1.sigev_notify_attributes = NULL;
  
      const int ERROR_BUFFER_SIZE = 50;
  
  
         slgInfo(testMain, "Before FIRST timer_create");
         sleep(30);
  
  
      // Create timer thread
      if (timer_create(CLOCK_REALTIME, &amp;evp1, &amp;audit_timer1) != 0)
      {
         // Character buffer for storing error message.
          char     errBuff[ERROR_BUFFER_SIZE];
  
          memset(errBuff, 0, ERROR_BUFFER_SIZE);
  
          slgError(testMain,
                      "timer_start create failed. Error = %s",
                      strerror_r(errno, errBuff, ERROR_BUFFER_SIZE));
  
          timer_delete(audit_timer1);
          bzero(&amp;audit_timer1, sizeof(audit_timer1));
      }
  
  
         slgInfo(testMain, "After FIRST timer_create");
         sleep(30); 
  
      return 0;
  
  }
  </code></pre>
  
  <p>&nbsp;</p>
  
  <pre><code>bash-3.1# ps -eL|grep testM
  16651 16651 pts/0    00:00:00 testMain
  16651 18018 pts/0    00:00:00 testMain 
  child thread with ID created by timer_create() = 18018
  </code></pre>