Difference between using fork/execvp and system call

前端 未结 5 1110
小鲜肉
小鲜肉 2021-02-07 12:13

What is the difference between using system() to execute a binary and using the combination of fork/execvp.

Is there any security/portablility/performance difference.

5条回答
  •  孤街浪徒
    2021-02-07 12:46

    there's also popen(), which is like system(), but allows to read child's output and provide input

提交回复
热议问题