3

I have a program that executes find command with pipes and fork. When I use one main pthread and one pthread per find i have these results (for 2 find) in pstree:

sysexplorer─┬─2*[find]
            └─{sysexplorer}

when I use one main pthread and a thread pool(with 10 threads) for the find i have these results (for 2 find again) in pstree:

sysexplorer─┬─2*[find]
            └─11*[{sysexplorer}]

is that correct? I believe it must be something like that:

sysexplorer─┬─10*[find]
            └─1*[{sysexplorer}] or sysexplorer─┬─11*[{sysexplorer}]

but I have no experience so I cannot be sure.

fork is called exactly before find. is that a reason?

If this is wrong what do I have to do?

Orion Papadakis
  • 398
  • 1
  • 14

0 Answers0