How can I start a new process in C? I tried with fork(), but I wish to call some functions in the new process. I have done some googling but couldn’t find proper information on what’s better: fork(), vfork(), exec() or clone(). If you permit another quick question, how can I start new thread?
How can I start a new process in C? I tried with fork() ,
Share
Check the example on Wikipedia; basically, after you fork you have to check the pid to understand if you are in the parent or child process.