问题描述
在用于HPC的Unix到Windows的Windows移植词典中 页面 for fork( )是书面的
On Unix to Windows Porting Dictionary for HPC page for fork() it's written
页面上还有示例源代码,该源代码使用...标准Win32 API CreateProcess
函数.
and further on the page there's example source code which uses... standard Win32 API CreateProcess
function.
我很困惑.
该示例不应该使用fork()来说明有关SUA/Interix正在实现fork()的声明吗?
如果真的实现了fork(),那么它将驻留在哪个头文件和lib文件中?
I'm confused.
Shouldn't the example use fork() to illustrate the statement about fork() being implemented by SUA/Interix?
If fork() is really implemented which header and lib files does it live in?
推荐答案
您正在查看的页面是* nix to Windows移植指南.它没有显示如何使用fork()
,而是显示了最接近的win32等当量CreateProcess
.那里的页面记录了应该使用哪些Win32函数而不是Unix函数.
The page you're looking at is the *nix to Windows porting guide. It doesn't show you how to use fork()
but the closest win32 equivialent, CreateProcess
. The pages there documents which Win32 function you should use instead of Unix functions.
您将需要用于Unix的子系统和 SUA SDK 以使用fork()
.在Windows上,您将获得一个* nix环境,fork()
将在常规的unistd.h
库中,并且您将链接到libc.so
(使用gcc)以使用它.
You'll need the subsystem for Unix and the SUA SDK to use fork()
. There you'll get a *nix environment on Windows, fork()
will be in the usual unistd.h
library, and you'll link to libc.so
(using gcc) to use it.
这篇关于Interix是否实现fork()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!