class_docstr: Wraps ``subprocess.Popen`` with IOStream support.
  
  The constructor is the same as ``subprocess.Popen`` with the following
  additions:
  
  * ``stdin``, ``stdout``, and ``stderr`` may have the value
    ``tornado.process.Subprocess.STREAM``, which will make the corresponding
    attribute of the resulting Subprocess a `.PipeIOStream`. If this option
    is used, the caller is responsible for closing the streams when done
    with them.
  
  The ``Subprocess.STREAM`` option and the ``set_exit_callback`` and
  ``wait_for_exit`` methods do not work on Windows. There is
  therefore no reason to use this class instead of
  ``subprocess.Popen`` on that platform.
  
  .. versionchanged:: 5.0
     The ``io_loop`` argument (deprecated since version 4.1) has been removed.
class_docstr_tok: ["Wraps","``","subprocess.Popen","``","with","IOStream","support",".","The","constructor","is","the","same","as","``","subprocess.Popen","``","with","the","following","additions",":","*","``","stdin","``",",","``","stdout","``",",","and","``","stderr","``","may","have","the","value","``","tornado.process.Subprocess.STREAM","``",",","which","will","make","the","corresponding","attribute","of","the","resulting","Subprocess","a","`",".PipeIOStream","`",".","If","this","option","is","used",",","the","caller","is","responsible","for","closing","the","streams","when","done","with","them",".","The","``","Subprocess.STREAM","``","option","and","the","``","set_exit_callback","``","and","``","wait_for_exit","``","methods","do","not","work","on","Windows",".","There","is","therefore","no","reason","to","use","this","class","instead","of","``","subprocess.Popen","``","on","that","platform",".","..","versionchanged",":",":","5.0","The","``","io_loop","``","argument","(","deprecated","since","version","4.1",")","has","been","removed","."]
docstr: Initializes the ``SIGCHLD`` handler.
  
  The signal handler is run on an `.IOLoop` to avoid locking issues.
  Note that the `.IOLoop` used for signal handling need not be the
  same one used by individual Subprocess objects (as long as the
  ``IOLoops`` are each running in separate threads).
  
  .. versionchanged:: 5.0
     The ``io_loop`` argument (deprecated since version 4.1) has been
     removed.
  
  Availability: Unix
docstr_tok: ["Initializes","the","``","SIGCHLD","``","handler",".","The","signal","handler","is","run","on","an","`",".IOLoop","`","to","avoid","locking","issues",".","Note","that","the","`",".IOLoop","`","used","for","signal","handling","need","not","be","the","same","one","used","by","individual","Subprocess","objects","(","as","long","as","the","``","IOLoops","``","are","each","running","in","separate","threads",")",".","..","versionchanged",":",":","5.0","The","``","io_loop","``","argument","(","deprecated","since","version","4.1",")","has","been","removed",".","Availability",":","Unix"]
code: def initialize(cls) -> None:
      """Initializes the ``SIGCHLD`` handler.
  
      The signal handler is run on an `.IOLoop` to avoid locking issues.
      Note that the `.IOLoop` used for signal handling need not be the
      same one used by individual Subprocess objects (as long as the
      ``IOLoops`` are each running in separate threads).
  
      .. versionchanged:: 5.0
         The ``io_loop`` argument (deprecated since version 4.1) has been
         removed.
  
      Availability: Unix
      """
      if cls._initialized:
          return
      loop = asyncio.get_event_loop()
      loop.add_signal_handler(signal.SIGCHLD, cls._cleanup)
      cls._initialized = True
  
imports: import asyncio
  import os
  import multiprocessing
  import signal
  import subprocess
  import sys
  import time
  from binascii import hexlify
  from tornado.concurrent import Future, future_set_result_unless_cancelled, future_set_exception_unless_cancelled
  from tornado import ioloop
  from tornado.iostream import PipeIOStream
  from tornado.log import gen_log
  import typing
  from typing import Optional, Any, Callable
label_desc: Use image node_id 4 for calling the Subprocess obj's underlying member method code with example usage: obj.initialize(cls) without return types