替换非阻塞功能系统() [英] replace system() with non-blocking function

查看:120
本文介绍了替换非阻塞功能系统()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想使用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.

这篇关于替换非阻塞功能系统()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆