+
    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_buggyWriteConnectionLost}
to test that IHalfCloseableProtocol.writeConnectionLost works for stdio
transports.
N)implementer)protocolstdio)IHalfCloseableProtocolIReactorCore
ITransport)logreflectc                      a  ] tR t^t o Rt^	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.
Fc                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "O/usr/lib/python3/dist-packages/twisted/test/stdio_test_halfclose_buggy_write.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      D r   c                    R# )z^
This is the desired event.  Once it has happened, stop the reactor so
the process will exit.
Nr   r   s   &r   readConnectionLost$HalfCloseProtocol.readConnectionLost(   s    r   Nc                $   < V ^8  d   QhRS[ RR/# )r   reasonr   N)object)r   r   s   "r   r   r   .   s      V t r   c                b    V P                   '       d   ^ 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)wasWriteConnectionLostexitCodereactorstop)r   r$   s   &&r   connectionLost HalfCloseProtocol.connectionLost.   s     
 &&&DMr   c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   7   s     1 1T 1r   c                &    R V n         \        R4      h)Tzsomething went wrong)r'   
ValueErrorr   s   &r   writeConnectionLost%HalfCloseProtocol.writeConnectionLost7   s    &*#/00r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r   )r   )r   r   s   "r   r   r      s       r   )r(   r'   )N)__name__
__module____qualname____firstlineno____doc__r(   r'   r   r!   r+   r0   __annotate_func____static_attributes____classdictcell__)r   s   @r   r   r      sG      H"# #  1 1C  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       t \u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 ' #$"1)) "1 %"1J zSXXa[!))+T#((1+s+,()+	&'KKMHH''( r   