Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3.11/site-packages/ansible/module_utils/common/__pycache__/ |
Upload File : |
� ���c � �^ � d dl mZmZmZ eZd dlZd dlZd dlZd dl m Z mZ d� Zd� Z d� Zd� ZdS )� )�absolute_import�division�print_functionN)�to_bytes� to_nativec �B � t t j d d� � S )N�__main__� _respawned)�hasattr�sys�modules� � �H/usr/lib/python3.11/site-packages/ansible/module_utils/common/respawn.py� has_respawnedr s � ��3�;�z�*�L�9�9�9r c �L � t � � rt d� � �t � � }t j � � \ }}t j |t |� � � � t j |� � t j | dg|�� � }t j |� � dS )a� Respawn the currently-running Ansible Python module under the specified Python interpreter. Ansible modules that require libraries that are typically available only under well-known interpreters (eg, ``yum``, ``apt``, ``dnf``) can use bespoke logic to determine the libraries they need are not available, then call `respawn_module` to re-execute the current module under a different interpreter and exit the current process when the new subprocess has completed. The respawned process inherits only stdout/stderr from the current process. Only a single respawn is allowed. ``respawn_module`` will fail on nested respawns. Modules are encouraged to call `has_respawned()` to defensively guide behavior before calling ``respawn_module``, and to ensure that the target interpreter exists, as ``respawn_module`` will not fail gracefully. :arg interpreter_path: path to a Python interpreter to respawn the current module z!module has already been respawnedz--)�stdinN)r � Exception�_create_payload�os�pipe�writer �close� subprocess�callr �exit)�interpreter_path�payload� stdin_read�stdin_write�rcs r �respawn_moduler"