Why mod_wsgi does not support daemon mode on Windows?

You can read this statement at http://code.google.com/p/modwsgi/

The mod_wsgi daemon mode, however, is only available on Apache 2.0 or 2.2, runs on UNIX, and only when the Apache runtime library underlying Apache has been compiled with threading support.

What is the reason for the lack of support for daemon mode in Windows?

I found above, getting

Invalid command 'WSGIDaemonProcess', perhaps misspelled or defined by a module not included in the server configuration 

Apache error. This is not a problem with enabling the module, as the WSGIScriptAlias directive works fine. I assume that the error I am getting is related to the restriction described in the mod_wsgi wiki.

+4
source share
2 answers

Windows does not provide a UNIX-style forex () system call, so a spawning process where a child process inherits the parent image of the process memory is not possible. Apache / mod_wsgi requires fork ().

+6
source

For anyone who, after reading Graham's answer, wants to learn more about fork () on Windows, there are questions related to this topic:

What is the closest thing for fork () windows?
replace fork () ing? in the windows.
CreateThread vs fork ()
fork / chroot equivalent for a Windows Server application
Is it worth it to run POSIX for Microsoft Windows 7?

Two interesting things mentioned in the threads above are the following:

Also, I asked. Does Interix implement fork ()?

+1
source

Source: https://habr.com/ru/post/1344403/


All Articles