Ticket #14958: 14958_fasctcgi_socket_umask.diff

File 14958_fasctcgi_socket_umask.diff, 1.1 KB (added by dmclain, 14 years ago)
  • django/core/servers/fastcgi.py

    diff --git a/django/core/servers/fastcgi.py b/django/core/servers/fastcgi.py
    index 7e724c2..c326e63 100644
    a b Optional Fcgi settings: (setting=value)  
    4242  debug=BOOL           set to true to enable flup tracebacks.
    4343  outlog=FILE          write stdout to this file.
    4444  errlog=FILE          write stderr to this file.
     45  socket_umask=UMASK   umask to use for creation of Unix Domain Socket.
    4546  umask=UMASK          umask to use when daemonizing, in octal notation (default 022).
    4647
    4748Examples:
    FASTCGI_OPTIONS = {  
    7778    'debug': None,
    7879    'outlog': None,
    7980    'errlog': None,
     81    'socket_umask': None,
    8082    'umask': None,
    8183}
    8284
    def runfastcgi(argset=[], **kwargs):  
    129131        return fastcgi_help("ERROR: Implementation must be one of prefork or thread.")
    130132
    131133    wsgi_opts['debug'] = options['debug'] is not None
     134    if options['socket_umask']: wsgi_opts['umask'] = int(options['socket_umask'])
    132135
    133136    try:
    134137        module = importlib.import_module('.%s' % flup_module, 'flup')
Back to Top