Windows中的mongodb fork [英] mongodb fork in windows

查看:141
本文介绍了Windows中的mongodb fork的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在教程中看到他们使用--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在这里有两个原语,分别是forkexec,但是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屋!

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