I have a string (fileContents) in shared memory that consists of a 9 lines:
sprintf(shared_memory, fileContents.c_str());
I want to call on fork() to create the same number of processes as lines. These processes will manipulate each line. However, I have no idea where to start when calling fork(). Every example I have looked at just consists of returning the process ID of parents and child processes and not showing how or when the processes executes something.
Any guidance would be appreciated, thanks!
execto run a new executable in the child process