如何使用C编程语言创建过程 [英] how to create a process using C programming language
本文介绍了如何使用C编程语言创建过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道如何使用C创建流程.
您能帮我吗?
Hi,
I don''t know how to create a process using C.
Can you help me?
推荐答案
如果您使用的是Windows,请尝试CreateProcess.
If you are using Windows then try CreateProcess.
Fork
是一个选择.
我想您会发现这很有帮助
http://www.gnu.org/s/hello/manual/libc/Creation-a-Process.html [ ^ ]
Fork
could be an option.
I think you will find this helpful
http://www.gnu.org/s/hello/manual/libc/Creating-a-Process.html[^]
您可以使用 ^ ]函数.
如果system
不能满足您的需求(即您需要对创建的流程进行更多控制),则应研究OS
提供的API
,然后调用适当的函数(例如CreateProcess
或在 Windows
上).
You may use the system[^] function.
Ifsystem
doesn''t fit your needs (i.e. you need more control on the created process) then you should study theAPI
provided by yourOS
and then call the appropriate function (e.g.CreateProcess
orShellExecute
onWindows
).
这篇关于如何使用C编程语言创建过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文