我在Windows 10上安装了ubuntu bash
并尝试从中分叉进程。如果我在bash
内部分析进程,它可以正常工作,但如果我从windows normal命令窗口运行bash
命令它不起作用。以下是我得到的错误:
>bash -c "mlaunch init --single"
about to fork child process, waiting until server is ready for connections.
forked process: 635
ERROR: child process failed, exited with error number 100
can't start process, return code 100. tried to launch: mongod --dbpath /mnt/c/Users/devel/joey/data/db --logpath /mnt/c/Users/devel/joey/data/mongod.log --port 27017 --logappend --fork
似乎我无法通过键入bash -c "xxxx"
命令来分叉进程。如果我先键入bash
切换到bash shell然后运行上面的命令,它就可以工作。但我真的需要从普通的窗口命令运行它。我怎样才能做到这一点?