I am working on a code which has several processes forked(). (linux - KDevelop)
The processes after they were created runs paralell in the background.
I want to read on a command line (like cinn >> kill=1 ) which tells the main process to kill all the childs and the main p., but I dont exactly know which process reads the input on the console.
How works the consol after forking. Which process reads the data from it?
I was trying to pass state values like kill=1, which should tell to all child processes that they should execute their ending processes and tell to the main process if it was succesful.
But I cant just pass any value to childs. I was trying with global variables (kill, processStatus1) but it did not work. Than I try pointers with same result.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.