U
    ‰¾úg  ã                   @  sT   d dl mZ d dlmZ d dlmZ ddlmZ ddlm	Z	m
Z
 G dd„ deƒZd	S )
é    )Úannotations)Úabstractmethod)ÚSignalsé   )ÚAsyncResource)ÚByteReceiveStreamÚByteSendStreamc                   @  sÈ   e Zd ZdZeddœdd„ƒZeddœdd„ƒZeddœd	d
„ƒZedddœdd„ƒZe	eddœdd„ƒƒZ
e	eddœdd„ƒƒZe	eddœdd„ƒƒZe	eddœdd„ƒƒZe	eddœdd„ƒƒZdS )ÚProcessz5An asynchronous version of :class:`subprocess.Popen`.Úint)Úreturnc                 Ã  s   dS )z^
        Wait until the process exits.

        :return: the exit code of the process
        N© ©Úselfr   r   ú;/tmp/pip-unpacked-wheel-3u0cc9gf/anyio/abc/_subprocesses.pyÚwait   s    zProcess.waitÚNonec                 C  s   dS )zó
        Terminates the process, gracefully if possible.

        On Windows, this calls ``TerminateProcess()``.
        On POSIX systems, this sends ``SIGTERM`` to the process.

        .. seealso:: :meth:`subprocess.Popen.terminate`
        Nr   r   r   r   r   Ú	terminate   s    zProcess.terminatec                 C  s   dS )zÑ
        Kills the process.

        On Windows, this calls ``TerminateProcess()``.
        On POSIX systems, this sends ``SIGKILL`` to the process.

        .. seealso:: :meth:`subprocess.Popen.kill`
        Nr   r   r   r   r   Úkill    s    zProcess.killr   )Úsignalr   c                 C  s   dS )z´
        Send a signal to the subprocess.

        .. seealso:: :meth:`subprocess.Popen.send_signal`

        :param signal: the signal number (e.g. :data:`signal.SIGHUP`)
        Nr   )r   r   r   r   r   Úsend_signal+   s    zProcess.send_signalc                 C  s   dS )zThe process ID of the process.Nr   r   r   r   r   Úpid5   s    zProcess.pidz
int | Nonec                 C  s   dS )zw
        The return code of the process. If the process has not yet terminated, this will
        be ``None``.
        Nr   r   r   r   r   Ú
returncode:   s    zProcess.returncodezByteSendStream | Nonec                 C  s   dS )z1The stream for the standard input of the process.Nr   r   r   r   r   ÚstdinB   s    zProcess.stdinzByteReceiveStream | Nonec                 C  s   dS )z2The stream for the standard output of the process.Nr   r   r   r   r   ÚstdoutG   s    zProcess.stdoutc                 C  s   dS )z8The stream for the standard error output of the process.Nr   r   r   r   r   ÚstderrL   s    zProcess.stderrN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   Úpropertyr   r   r   r   r   r   r   r   r   r	   
   s0   

	r	   N)Ú
__future__r   Úabcr   r   r   Z
_resourcesr   Z_streamsr   r   r	   r   r   r   r   Ú<module>   s
   