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

   I managed to get around the problem by putting this in my 
`airflow_local_settings.py`. You can probably try adding it to some file that's 
loaded up very early in the startup. eg for me, `airflow.cfg` references 
`airflow_local_settings.py` so I put it there.
   
   
   ```py
   import platform
   
   
   # Patch setproctitle for macOS to avoid segmentation faults
   
   if platform.system() == "Darwin":
       import logging
       from types import ModuleType
   
       logger = logging.getLogger(__name__)
   
       # Create a proper mock module
       mock_setproctitle = ModuleType("setproctitle")
   
       # Add the setproctitle function to the mock module
       def _setproctitle(*args, **kwargs):
           logger.warning(f"Skipping setproctitle: {args} {kwargs}")
   
       mock_setproctitle.setproctitle = _setproctitle
   
       # Replace the module in sys.modules before any other imports
       sys.modules["setproctitle"] = mock_setproctitle
   
   ```


-- 
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