开发者

Why doesn't mod_wsgi support daemon mode on Windows?

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.


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().


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()?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜