[Twisted-Python] _twistd_unix.py / daemonize() / OSX / USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Wed Oct 13 17:17:35 EDT 2010


On 08:46 pm, glyph at twistedmatrix.com wrote:
>
>On Oct 13, 2010, at 1:20 PM, James Y Knight wrote:
>>>Here's a compact version. The script uses OSX' Quartz to create and 
>>>manipulate images. Twisted is used to wrap it as a webserver, images 
>>>are served. More pointers on how to start and use it in the script 
>>>itself.
>>
>>You need to avoid using or importing any OSX APIs until after the 
>>daemonization has occurred. Unfortunately, twisted executes the entire 
>>script file before daemonizing. [that's unfortunate for other reasons 
>>besides this, too]
>
>If we are going to change this behavior, we should make twistd do 
>something more correct, and optionally allow it to report startup 
>errors to the console after it's forked, even if those errors don't 
>necessarily crash it during startup.  This isn't rocket science, 
>inheriting file descriptors and delaying exit are all pretty easy.

http://tm.tl/823

Jean-Paul



More information about the Twisted-Python mailing list