2011-03-19 59 views
4

http://code.google.com/p/modwsgi/一個能閱讀本聲明的mod_wsgi的爲什麼mod_wsgi在Windows上不支持守護進程模式?

守護模式將然而 只可在Apache 2.0或2.2 在UNIX上運行,只有當潛在 阿帕奇的 Apache的運行時庫已編譯支持 進行線程化。

在Windows下不支持守護進程模式的原因是什麼?

我發現上面的Apache的越來越

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

錯誤之後。這不是模塊的問題,因爲WSGIScriptAlias指令工作正常。我想我得到的錯誤是由於mod_wsgi wiki上描述的限制。

回答

6

Windows不提供UNIX風格的fork()系統調用,因此子進程繼承父進程內存映像的進程產卵不可能。 Apache/mod_wsgi需要fork()。

+0

我猜Apache使用Apache的便攜式運行庫,它看起來像理想的地方來處理缺乏某些操作系統叉()的。 APR被建議作爲解決方案缺乏fork()在Windows [這裏](http://stackoverflow.com/questions/1686578/fork-chroot-equivalent-for-windows-server-application/1709145#1709145)。但是我看了一下APR的文檔,它看起來像[不](http://apr.apache.org/docs/apr/0.9/group__apr__thread__proc.html#g3d0415bf69b0a629a929833e82758b85)在Windows上實現fork()。 – 2011-03-20 19:44:52

1

對於所有誰,閱讀格雷厄姆的回答後,想知道更多叉()在Windows下面是有關這個主題的問題:

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?

上面提到的兩個有趣的事情是:

另外我問Does Interix implement fork()?

相關問題