替换非阻塞功能系统()

替换非阻塞功能系统()

问题描述:

我不想使用system()在我的C程序中,由于系统(3)块,这不是我想要的。什么是做到这一点的最佳方式?

I don't want to use system() in my C program, because system(3) blocks and this is not what I want. What is the optimal way to do it?

我认为,一个快速和肮脏的动作是调用系统正(命令&安培)。在&功放;将产生新的进程。

I think that a quick and dirty action is to call sytem(command &). the & will spawn the new process.