code: def set_owner_process(uid, gid):
      
      if gid:
          try:
              os.setgid(gid)
          except OverflowError:
              # versions of python < 2.6.2 don't manage unsigned int for
              # groups like on osx or fedora
              os.setgid(-ctypes.c_int(-gid).value)
      if uid:
          os.setuid(uid)
docs: set user and group of workers processes