How can I call an external program from program C

I am currently working on porting some bash scripts to C, and one of them is calling an external python script, for example, for example. / remoteclient 01a.py "remotecommand player / something something"

./remoteclient01a.py "remotecommand player /something something"

and I was looking for a way to execute this command in C, but Im not quite sure what I should use, since System () seems to be the best, but then a few pages say that this is a bad choice in some cases, therefore, if someone can recommend a method for this, I would really appreciate it, thanks!

+3
source share
2 answers

C system popen. popen .

+2
  • unixish popen().


The popen() function opens a process by creating a pipe, forking and involking the
shell.
0

All Articles