Two C executables A and B exist. A and B communicate to each other through a socket.
B can be started independently or through A.
If B is started first and A is started next, then A and B start properly without issues. Even if A is restarted, then there are no issues.
If B is started through A, then A and B starts properly. But here the communication port is bound to both A and B. Here, if A is restarted, then A fails to start.
Since B is started through A, Process A is the parent of Process B.
So, is there any means by which the Process B can be started independently from Process A?
We tried using fork, but with fork when we try to start the exe, two process is being started instead of one.