def kill_running():
            create = self.loop.subprocess_exec(asyncio.SubprocessProtocol,
                                               *PROGRAM_BLOCKED)
            transport, protocol = yield From(create)

            non_local = {'kill_called': False}
            def kill():
                non_local['kill_called'] = True
                orig_kill()

            proc = transport.get_extra_info('subprocess')
            orig_kill = proc.kill
            proc.kill = kill
            returncode = transport.get_returncode()
            transport.close()
            yield From(transport._wait())
            raise Return(returncode, non_local['kill_called'])