Ë
    #V.jÎ
  ã                  óÖ   — d Z ddlmZ ddlZddlZddlZddlmZ ddlmZ ddl	m
Z
 ddlmZ  ej                  «         ej                  d«      Z	 	 	 	 	 	 	 	 dd	„Z	 	 	 	 	 	 	 	 	 	 dd
„Zy)ze
Some light wrappers around Python's multiprocessing, to deal with cleanly
starting child processes.
é    )ÚannotationsN)ÚSpawnProcess)Úsocket)ÚCallable)ÚConfigÚspawnc                ó²   — 	 t         j                  j                  «       }| |||dœ}t
        j                  t        |¬«      S # t        t        f$ r d}Y Œ5w xY w)aÔ  
    Called in the parent process, to instantiate a new child process instance.
    The child is not yet started at this point.

    * config - The Uvicorn configuration instance.
    * target - A callable that accepts a list of sockets. In practice this will
               be the `Server.run()` method.
    * sockets - A list of sockets to pass to the server. Sockets are bound once
                by the parent process, and then passed to the child processes.
    N©ÚconfigÚtargetÚsocketsÚstdin_fileno)r   Úkwargs)ÚsysÚstdinÚfilenoÚAttributeErrorÚOSErrorr   ÚProcessÚsubprocess_started)r   r   r   r   r   s        úUC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\uvicorn/_subprocess.pyÚget_subprocessr      s_   € ð"Ü—y‘y×'Ñ'Ó)ˆð ØØØ$ñ	€Fô �=‰=Ô 2¸6ˆ=ÓBÐBøô œGÐ$ò ØŠðús   ‚A ÁAÁAc                ó–   — |�t        j                  |«      t        _        | j	                  «        	  ||¬«       y# t
        $ r Y yw xY w)aú  
    Called when the child process starts.

    * config - The Uvicorn configuration instance.
    * target - A callable that accepts a list of sockets. In practice this will
               be the `Server.run()` method.
    * sockets - A list of sockets to pass to the server. Sockets are bound once
                by the parent process, and then passed to the child processes.
    * stdin_fileno - The file number of sys.stdin, so that it can be reattached
                     to the child process.
    N)r   )ÚosÚfdopenr   r   Úconfigure_loggingÚKeyboardInterruptr
   s       r   r   r   6   sI   € ð$ ÐÜ—I‘I˜lÓ+ŒŒ	ð ×ÑÔðá�wÖøÜò ñ 	ðús   ²	< ¼	AÁA)r   r   r   úCallable[..., None]r   úlist[socket]Úreturnr   )
r   r   r   r   r   r   r   z
int | Noner    ÚNone)Ú__doc__Ú
__future__r   Úmultiprocessingr   r   Úmultiprocessing.contextr   r   Útypingr   Úuvicorn.configr   Úallow_connection_picklingÚget_contextr   r   r   © ó    r   Ú<module>r,      s¦   ðñõ
 #ã Û 	Û 
Ý 0Ý Ý å !à )€× )Ñ )Ô +Ø#ˆ×#Ñ# GÓ,€ðCØðCàðCð ðCð ó	CðBØðàðð ðð ð	ð
 
ôr+   