Hi,
I have a requirement in which I am given a list of commands(e.g. ls, ps etc.) to be executed.
I want to execute these commands concurrently using popen() [which internally calls fork()].
My first idea was to use a pool of "pthreads" to do this. But, as I read from the URL's,
http://forum.soft32.com/linux/popen-...ict350819.html
http://helgafell.rhi.hi.is/libc/Thre...s%20and%20Fork
it does not seem to be safe to use fork() inside thread.
So, now I have decided to use a pool of "processes" to do this.
So, just wanted to confirm,
* if anybody has used fork() inside threads and what problems were faced if any?
* is it really unsafe to use fork() inside threads?
* if Yes, then, does c++ boost library guarantee any safety for calling fork() inside threads?
Regards,
Girish