PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Dir : /proc/self/root/opt/saltstack/salt/lib/python3.10/site-packages/setproctitle/ |
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 IP: 209.182.202.254 |
Dir : //proc/self/root/opt/saltstack/salt/lib/python3.10/site-packages/setproctitle/__init__.py |
"""Allow customization of the process title.""" import os import sys import logging logger = logging.getLogger("setproctitle") __version__ = "1.3.2" __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 "" 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 # noqa: F811 getproctitle = _setproctitle.getproctitle # noqa: F811 setthreadtitle = _setproctitle.setthreadtitle # noqa: F811 getthreadtitle = _setproctitle.getthreadtitle # noqa: F811 # Call getproctitle to initialize structures and avoid problems caused # by fork() on macOS (see #113). if sys.platform == "darwin": getproctitle()