I have a situation as following:
main()
{
create a thread executing function thread_func();
another_func();
}
another_func()
{
//check something and do something.
// To do something, create a child process.
// after creating child process, current thread goes in checking state again
// child process independently running.
}
thread_func()
{
infinite loop(); // checking something and doing something
}
thread is created using pthread. Please tell: is it good to start a child process like above in a thread? Also what happens if this is done.
Does child process creates its own another copy thread executing thread_func()?
Thanks