Can we start a background process using exec() giving & as an argument?

前端 未结 3 959
情话喂你
情话喂你 2021-01-18 13:34

If not, how can we start a background process in C?

3条回答
  •  清酒与你
    2021-01-18 14:10

    Use the fork() call to create a new process, then exec() to load a program into that process. See the man pages (man 2 fork, man 2 exec) for more information, too.

提交回复
热议问题