Hi all,
It is possible to call a fork() cmd inside a thread?
I couldn't find any documentation on this.
Thanks
Printable View
Hi all,
It is possible to call a fork() cmd inside a thread?
I couldn't find any documentation on this.
Thanks
Of course it's "possible".
Whether it's a good idea or not remains to be seen.
what is the situation when u need(want) to fork a thread.
If that is a question in general, yes definitely you can call fork inside a thread.
If you dont have multiple threads in your code you call fork() from your main thread!
So it isn't a requirement to specify about calling fork() from a thread as it doesn't have to do much with threads.
But it remains to be seen whether calling fork() from a specific thread in your code effects the performance of your code or not.
If you have a specific problem, do state it.