ndewijer commented on issue #55838:
URL: https://github.com/apache/airflow/issues/55838#issuecomment-3526884771

   I build further on this. The airflow_config_settings was not being loaded 
fast enough so I modified the setproctitle init inside my venv with:
   
   
   `site-packages/setproctitle/__init__.py`
   ```
   """Allow customization of the process title."""
   
   import os
   import sys
   import logging
   
   logger = logging.getLogger("setproctitle")
   
   __version__ = "1.3.3"
   
   __all__ = [
       "setproctitle",
       "getproctitle",
       "setthreadtitle",
       "getthreadtitle",
   ]
   
   
   def setproctitle(title: str) -> None:
       logger.debug("setproctitle C module not available")
       return None
   
   
   def getproctitle() -> str:
       logger.debug("setproctitle C module not available")
       return " ".join(sys.argv)
   
   
   def setthreadtitle(title: str) -> None:
       logger.debug("setproctitle C module not available")
       return None
   
   
   def getthreadtitle() -> str:
       logger.debug("setproctitle C module not available")
       return ""
   
   
   # PATCHED: Skip C module import on macOS to avoid SIGSEGV crashes
   # The fallback Python implementations above will be used instead
   if sys.platform != "darwin":
       try:
           from . import _setproctitle  # type: ignore
       except ImportError as e:
           # Emulate SPT_DEBUG showing process info in the C module.
           if os.environ.get("SPT_DEBUG", ""):
               logging.basicConfig()
               logger.setLevel(logging.DEBUG)
           logger.debug("failed to import setproctitle: %s", e)
       else:
           setproctitle = _setproctitle.setproctitle 
           getproctitle = _setproctitle.getproctitle
           setthreadtitle = _setproctitle.setthreadtitle
           getthreadtitle = _setproctitle.getthreadtitle
   else:
       logger.debug("Using Python fallback for setproctitle on macOS to avoid 
SIGSEGV")
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to