I managed to unlock and run another program from my application. I am currently working on how to wait until a process called by exec returns a result via a pipe or stdout. However, can I have a group of processes using one fork, or do I need to deploy and repeat the same program many times? Can I get a PID for every other process? I want my application to call the same program that I now call many times, but with different parameters: I want a group of 8 processes of the same program to work and return results through channels. Can someone please point me in the right direction please? I looked at the linux.die man pages, but they are pretty spartan and cryptic in my description. Is there an e-book or pdf,Which can I find for more information? Thank!
pid_t pID = fork();
if (pID == 0){
int proc = execl(BOLDAGENT,BOLDAGENT,"-u","2","-c","walkevo.xml",NULL);
std::cout << strerror(errno) << std::endl;
}
For example, how can I control the PID, which child element (according to the xml file) received the result (by pipe or stdout), and thus act accordingly? Do I have to encapsulate child processes in an object and work from there, or can I group them at all?
Γlex source
share