我在教程中看到他们使用--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,如此处所述: 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
发布评论