On Wed, 14 Dec 2016 07:33:46 -0800
"Garrett D'Amore" <garrett@xxxxxxxxxx> wrote:
Some of the details are a little bit incorrect, and also linux specific
(clone() is used to create both whole processes and threads or lightweight
processes.) However the conclusions remain the same.
Most of the daemons you see probably have just used fork() to create copies
of themselves. This is a common practice, especially amongst older
software that runs on systems that predate the existence of pthreads. Most
webservers (Apache, etc.) use this strategy for example. These are not
LWPs but real processes; they just didn’t do exec() after calling fork().
...
At any rate, traditional tools like ps probably won’t be able to observe
threads or LWPs with the usual options. Some of them may have options to
include the LWPs in their output, but you usually have to ask for this
specifically.
I have complete confidence that the use of threads by nanomsg and nng will
not affect you. I’d say you can effectively ignore the presence of
pthreads (except that for some ugly technical reasons, nanomsg and nng do
not support calling back into the library in the child of a fork() unless
exec() is called in the child first. I think its unlikely you’re doing
that based on what you’ve told me already.)