Hey there,

in Linux a thread is a normal process with the specialty that it shares some
attributes with its creator (i.e. file descriptors, heap memory)...
That's why each thread gets its own PID.

Regards,

Andreas



Guillaume Dargaud wrote:
> Hello all,
> I'm not sure what mailing list this question belongs to.
>
> I just added some multithreading to a user app and I'm surprised to
> see it show with 4 different PIDs when I use ps or top. The program
> has 3 threads, including the main one.
> I thought that only forked programs created different PIDs, not threads.
>
> I'm on Buildroot+Busybox+uClibc, all about 6 months old.
>
> Anyone cares to explain, thanks (I breaks some control scripts).
> ------------------------------------------------------------------------
>
> _______________________________________________
> busybox mailing list
> [email protected]
> http://lists.busybox.net/mailman/listinfo/busybox

begin:vcard
fn:Andreas Wehrmann
n:Wehrmann;Andreas
org:Centersystems GmbH;Software Development
adr:;;Ignaz-Koeck-Strasse 19;Vienna;Vienna;1210;Austria
email;internet:[email protected]
title:Cand. Ing.
tel;work:+43 (0)190 199 3616
tel;fax:+43 (0)190 199 2110
x-mozilla-html:FALSE
url:http://www.centersystems.com
version:2.1
end:vcard

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to