+
    Dfj)                       a  R t0 t R t^ RIt^ RIHt ^ RIHtHt ^ RIH	t	H
t
Ht ^ RIHtHt ]! ]	4       ! R R]P                  4      4       t]R8X  d   ]P$                  ! ]P&                  ^,          4      P)                  4        ]P*                  ! ]! ]P&                  ^,          R	4      4       ] ^ k ^ R
IHt ]! 4       t]P2                  ! ]4       ]P4                  ! 4        ]P6                  ! ]P8                  4       R# R# )z
Main program for the child process run by
L{twisted.test.test_stdio.StandardInputOutputTests.test_readConnectionLost} to
test that IHalfCloseableProtocol.readConnectionLost works for stdio transports.
N)implementer)protocolstdio)IHalfCloseableProtocolIReactorCore
ITransport)logreflectc                      a  ] tR t^t o RtRtV 3R lR ltV 3R lR ltRV 3R lR lltV 3R	 lR
 lt	V 3R lt
RtV tR# )HalfCloseProtocolz
A protocol to hook up to stdio and observe its transport being
half-closed.  If all goes as expected, C{exitCode} will be set to C{0};
otherwise it will be set to C{1} to indicate failure.
Nc                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "I/usr/lib/python3/dist-packages/twisted/test/stdio_test_halfclose_buggy.py__annotate__HalfCloseProtocol.__annotate__    s     # # #    c                <    V P                   P                  R4       R# )z-
Signal the parent process that we're ready.
   xN)	transportwriteselfs   &r   connectionMade HalfCloseProtocol.connectionMade    s     	T"r   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   &   s     1 1D 1r   c                    \        R4      h)z^
This is the desired event.  Once it has happened, stop the reactor so
the process will exit.
zsomething went wrong)
ValueErrorr   s   &r   readConnectionLost$HalfCloseProtocol.readConnectionLost&   s    
 /00r   c                $   < V ^8  d   QhRS[ RR/# )r   reasonr   N)object)r   r   s   "r   r   r   -   s      V t r   c                >    ^ V n         \        P                  ! 4        R# )zt
This may only be invoked after C{readConnectionLost}.  If it happens
otherwise, mark it as an error and shut down.
N)exitCodereactorstop)r   r%   s   &&r   connectionLost HalfCloseProtocol.connectionLost-   s    
 r   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   5   s      T r   c                    R # Nr   r   s   &r   writeConnectionLost%HalfCloseProtocol.writeConnectionLost5   s    r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r   )r   )r   r   s   "r   r   r      s       r   )r(   r/   )__name__
__module____qualname____firstlineno____doc__r(   r   r"   r+   r0   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r      sA      H# #1 1  A  r   r   __main__w)r)   c                @    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   r)   )__conditional_annotations__r   )r   s   "r   r   r      s       p \qr   )r>   r7   syszope.interfacer   twisted.internetr   r   twisted.internet.interfacesr   r   r   twisted.pythonr   r	   Protocolr   r3   namedAnyargvinstallstartLoggingopenr)   halfCloseProtocol
StandardIOrunexitr(   r   )r>   s   @r   <module>rN      s   
  & , X X ' #$!)) ! %!H zSXXa[!))+T#((1+s+,()+	&'KKMHH''( r   