def suspend_to_background(self, suspend_group=True):
        # Only suspend when the opperating system supports it.
        # (Not on Windows.)
        if hasattr(signal, 'SIGTSTP'):
            def run():
                # Send `SIGSTP` to own process.
                # This will cause it to suspend.

                # Usually we want the whole process group to be suspended. This
                # handles the case when input is piped from another process.
                if suspend_group:
                    os.kill(0, signal.SIGTSTP)
                else:
                    os.kill(os.getpid(), signal.SIGTSTP)

            self.run_in_terminal(run)
C{pause()}ing a task while it is waiting on an outstanding
dataset/ETHPy150Open jonathanslenders/python-prompt-toolkit/prompt_toolkit/interface.py/CommandLineInterface.suspend_to_background--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/test/test_cooperator.py/RunStateTests.test_pauseWhileDeferred