Interix是否实现fork()? [英] Does Interix implement fork()?

查看:80
本文介绍了Interix是否实现fork()?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于HPC的Unix到Windows的Windows移植词典中 页面 for fork( )是书面的

On Unix to Windows Porting Dictionary for HPC page for fork() it's written

没有等效的Windows API Unix fork()或vfork().这 基于Unix的Microsoft子系统 应用程序(SUA或Interix)是 具有fork()和 vfork()正确实现.

There is no equivalent Windows API to the Unix fork() or vfork(). The Microsoft Subsystem for Unix-based Applications (SUA or Interix) is a Unix environment that has fork() and vfork() properly implemented.

页面上还有示例源代码,该源代码使用...标准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的子系统和

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()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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