Answer the question
In order to leave comments, you need to log in
How to run a program in a separate process in linux in C ++, get its PID and transfer the contents of the file to the stdin of the process?
The someProgram program is only available in binary form.
I tried
popen("cat ./someFile | ./someProgram &")
but instead of PID it gives the result of someProgram.
The PID is needed to kill someProgram if it takes too long to run.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question