Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6932021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:39:12+00:00 2026-05-27T11:39:12+00:00

When I create a thread ( pthread_create() ) from my main process, I see

  • 0

When I create a thread (pthread_create()) from my main process, I see three (3) threads in the ps listing, why is this? That is, I see the process for the main thread, one for the created thread, and third for something else. What is the something else? Everything works just fine, I’m just wondering what the extra listed process is.

~/ cat test.c
#include <errno.h>
#include <pthread.h>
static          pthread_t       thread;
void * test_thread(void * ptr)
{
    sleep(30);
    return(ptr);
}
void thread_init(void)
{
     if (pthread_create( &thread , NULL, test_thread, NULL))
          perror("Thread not created!");
}
int main(int argc, char ** argv)
{
    thread_init();
    sleep(30);
}

When I execute this code on a system running Linux 2.6.14 and BusyBox (but using bash 2.04g), the ps listing I get after rebooting and launching my test program above:

...
   52 root            SW  [kswapd0]
  667 root            SW  [mtdblockd]
  710 root            SWN [jffs2_gcd_mtd4]
  759 root        980 S   /bin/sh
  760 root        500 S   /bin/inetd
  761 root        516 S   /bin/boa
  762 root        644 S   /sbin/syslogd -n
  763 root        640 S   /sbin/klogd -n
  766 root       1516 S   /bin/sshd -i
  767 root       1036 S   -sh
  768 root        420 S   ./test
  769 root        420 S   ./test
  770 root        420 S   ./test
  771 root        652 R   ps

The kernel is a 2.6.14 kernel with a few added drivers modules.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:39:13+00:00Added an answer on May 27, 2026 at 11:39 am

    It is likely the “thread manager” thread. See answer D.5 at this link.

    You won’t see the extra process listed on most modern Linux systems if they are using NPTL. But I searched and it sounds like BusyBox uses ulibc which I think only added NPTL support recently. So I don’t know for sure, but my guess is you are using LinuxThreads and seeing the manager thread as the extra thread.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First one: how can I create a Thread that doesn't start right away.If I
I intent to have two threads waiting for signals from a third thread. These
The function header for pthread_create looks like this: int pthread_create(pthread_t * thread, const pthread_attr_t
i'm working with a multi-threaded program (using pthreads) that currently create a background thread
I create a second thread to call a method that downloads several images using:
I have some JNI code in a thread that calls from Java to C.
This is my first attempt on semaphores and threads. I constructed this code from
I am trying to start a method from my main() as a new thread
Let's say I: malloc a pthread_t for holding a thread context pthread_create with as
pthread_create returns the value 251 without creating the thread. Does anyone know what the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.