为什么 mod_wsgi 不支持 Windows 上的守护进程模式?
在 http://code.google.com/p/modwsgi/ 上可以阅读此声明
mod_wsgi 的守护进程模式将会 仅适用于 Apache 2.0 或 2.2 运行在 UNIX 上,并且仅当 Apache底层运行时库 Apache已编译支持 用于线程。
Windows下不支持守护进程模式是什么原因?
我在
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration
从 Apache 收到错误后发现了上述内容。模块的包含不是问题,因为 WSGIScriptAlias
指令工作正常。我想我得到的错误是由于 mod_wsgi 的 wiki 上描述的限制造成的。
On http://code.google.com/p/modwsgi/ one can read this statement
Daemon mode of mod_wsgi will however
only be available on Apache 2.0 or 2.2
running on UNIX, and only when the
Apache runtime library underlying
Apache has been compiled with support
for threading.
What's the reason there's no support for daemon mode under Windows?
I found the above after getting
Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration
error from Apache. It's not a problem with module's inclusion as WSGIScriptAlias
directive works ok. I guess the error I get is due the limitation described on the mod_wsgi's wiki.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Windows 不提供 UNIX 风格的 fork() 系统调用,因此子进程继承父进程内存映像的进程生成是不可能的。 Apache/mod_wsgi 需要 fork()。
Windows doesn't provide UNIX style fork() system call and so process spawning where child process inherits parent process memory image isn't possible. Apache/mod_wsgi requires fork().
对于所有在阅读 Graham 的回答后想要了解有关 Windows 上 fork() 的更多信息的人,这里有与此主题相关的问题:
什么是最接近的Windows 必须 fork() 吗?
替代 fork()ing?在 Windows 中。
CreateThread 与 fork()
Windows 服务器应用程序的 fork/chroot 等效项
Microsoft Windows 7 POSIX 实现目前处于什么位置?
上面线程中提到的两件有趣的事情是:
Interix - 用于 Microsoft 基于 Windows NT 的操作系统的可选、全功能 POSIX 和 Unix 环境子系统。< /p>
Cygwin 的 fork 实现
此外,我还询问了Interix 是否实现 fork() ?
For all who, after reading Graham's answer, want to know more on fork() on Windows here are questions related to this subject:
What is the closest thing windows has to fork()?
substitute for fork()ing? in windows.
CreateThread vs fork()
fork/chroot equivalent for Windows server application
Where does Microsoft Windows 7 POSIX implementation currently stands?
The two interesting things mentioned in the threads above are:
Interix - an optional, full-featured POSIX and Unix environment subsystem for Microsoft's Windows NT-based operating systems.
Cygwin's fork implementation
In addition I asked Does Interix implement fork()?