Windows中的mongodb fork [英] mongodb fork in windows
问题描述
我在教程中看到他们使用--fork
作为mongod的参数.但是,当我尝试这样做时,它说未知选项--fork
.那么如何在Windows上--fork
mongodb?
I have seen on tutorials that they use --fork
as parameter of mongod. But when I try to do so, it says unknown option --fork
. So how to --fork
mongodb on windows?
推荐答案
--fork
实际上是Linux命令,而不是Windows或mongod
命令.我认为Windows根本不存在相同的情况.
--fork
is actually a Linux command not a Windows or mongod
command. I do not believe the same exists on Windows at all.
Linux在这里有两个原语,分别是fork
和exec
,但是Windows确实只有createProcess
,实际上是fork
-和-exec
.
Linux has two primitives here, fork
and exec
however Windows only really has createProcess
which is effectively fork
-and-exec
.
设置服务并以fork
模式运行它是不同的,服务更像init.d
脚本,但这实际上是唯一的方法.
Setting up a service and running it in fork
mode is not the same, a service is more like a init.d
script however that is currently the only way really.
Cygwin可以非常缓慢地在Windows上模拟fork,如此处所述:
Cygwin can emulate fork on Windows, very slowly, as described here: What is the closest thing windows has to fork()?
这篇关于Windows中的mongodb fork的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!