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`.
  * A new keyword argument ``io_loop`` may be used to pass in an IOLoop.
  
  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:: 4.1
     The ``io_loop`` argument is deprecated.
docstr: Runs ``callback`` when this process exits.
  
  The callback takes one argument, the return code of the process.
  
  This method uses a ``SIGCHLD`` handler, which is a global setting
  and may conflict if you have other libraries trying to handle the
  same signal.  If you are using more than one ``IOLoop`` it may
  be necessary to call `Subprocess.initialize` first to designate
  one ``IOLoop`` to run the signal handlers.
  
  In many cases a close callback on the stdout or stderr streams
  can be used as an alternative to an exit callback if the
  signal handler is causing a problem.
docstr_tok: ["Runs","``","callback","``","when","this","process","exits",".","The","callback","takes","one","argument",",","the","return","code","of","the","process",".","This","method","uses","a","``","SIGCHLD","``","handler",",","which","is","a","global","setting","and","may","conflict","if","you","have","other","libraries","trying","to","handle","the","same","signal",".","If","you","are","using","more","than","one","``","IOLoop","``","it","may","be","necessary","to","call","`","Subprocess.initialize","`","first","to","designate","one","``","IOLoop","``","to","run","the","signal","handlers",".","In","many","cases","a","close","callback","on","the","stdout","or","stderr","streams","can","be","used","as","an","alternative","to","an","exit","callback","if","the","signal","handler","is","causing","a","problem","."]
code: def set_exit_callback(self, callback):
      """Runs ``callback`` when this process exits.
  
      The callback takes one argument, the return code of the process.
  
      This method uses a ``SIGCHLD`` handler, which is a global setting
      and may conflict if you have other libraries trying to handle the
      same signal.  If you are using more than one ``IOLoop`` it may
      be necessary to call `Subprocess.initialize` first to designate
      one ``IOLoop`` to run the signal handlers.
  
      In many cases a close callback on the stdout or stderr streams
      can be used as an alternative to an exit callback if the
      signal handler is causing a problem.
      """
      self._exit_callback = stack_context.wrap(callback)
      Subprocess.initialize(self.io_loop)
      Subprocess._waiting[self.pid] = self
      Subprocess._try_cleanup_process(self.pid)
  
imports: from __future__ import absolute_import, division, print_function
  import errno
  import os
  import signal
  import subprocess
  import sys
  import time
  from binascii import hexlify
  from tornado.concurrent import Future
  from tornado import ioloop
  from tornado.iostream import PipeIOStream
  from tornado.log import gen_log
  from tornado.platform.auto import set_close_exec
  from tornado import stack_context
  from tornado.util import errno_from_exception, PY3
label_desc: Use image node_id 2 for calling the Subprocess obj's underlying member method code with example usage: obj.set_exit_callback(callback) without return types