简体   繁体   中英

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:

In addition I asked Does Interix implement fork()?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM