Does Interix implement fork()?

前端 未结 1 1323
天涯浪人
天涯浪人 2020-12-18 02:04

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

There is no equivalent Windows API to the Unix fork() or vfork(

相关标签:
1条回答
  • 2020-12-18 02:46

    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.

    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.

    0 讨论(0)
提交回复
热议问题