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
Could it be that ps is displaying 1 line for the process and 2 lines for both threads. You don't show how ps is being issued, what version, nor do you contain the entire about of the ps command.
ps typically shows only processes, not threads.
According to busybox.net/downloads/BusyBox.html the ps command will not show threads. ps -T will show threads. So if you are sure only ps is being issued (I don't know about alias in BusyBox or anything at all, I've never used it) then you are seeing 3 processes, not threads.
Also you may be using an old version of BusyBox? Refer to this bug report: bugs.busybox.net/show_bug.cgi?id=3835