I want to create a process B from process A. However, I don’t want B to be the child of A, which will be the case if I simply use fork. How can I achieve that? In other words I want process B to keep on executing even if process A is killed.
Share
You can use the setsid() function.
Alternatively, as you have tagged your question “linux”, maybe you want to use daemon() instead of fork() + setsid().