spawn 和 fork 有什么区别?
What is the difference between spawn and fork?
我在开始新进程的上下文中遇到过 spawn
和 fork
,但有什么区别?
handled/explained 从 unix 到 Windows 有区别吗?
fork
is a standard system call in Unix, and does not exist in Windows. clone
密切相关(并且在 Linux 上它们使用相同的内部函数实现)。它用于简单地复制当前正在执行的进程。
在 Windows 上,CreateProcess
用于通过启动磁盘上的可执行文件来创建新进程。
Windows 有一个 spawn
functions, whereas POSIX specifies posix_spawn
的家庭。这些完成了人们通常想要做的事情:执行一些程序。
我在开始新进程的上下文中遇到过 spawn
和 fork
,但有什么区别?
handled/explained 从 unix 到 Windows 有区别吗?
fork
is a standard system call in Unix, and does not exist in Windows. clone
密切相关(并且在 Linux 上它们使用相同的内部函数实现)。它用于简单地复制当前正在执行的进程。
在 Windows 上,CreateProcess
用于通过启动磁盘上的可执行文件来创建新进程。
Windows 有一个 spawn
functions, whereas POSIX specifies posix_spawn
的家庭。这些完成了人们通常想要做的事情:执行一些程序。