title: Python3 asyncio "Task was destroyed but it is pending" with some specific condition
body: <p>Here is simplified code, which uses python3 coroutine and sets handler for SIGING and SIGTERM signals for stopping job properly:</p>
  
  <pre><code>#!/usr/bin/env python3
  # -*- coding: utf-8 -*-
  import argparse
  import asyncio
  import signal
  import sys
  
  
  def my_handler(signum, frame):
      print('Stopping')
      asyncio.get_event_loop().stop()
      # Do some staff
      sys.exit()
  
  
  @asyncio.coroutine
  def prob_ip(ip_addr):
  
      print('Ping ip:%s' % ip_addr)
      proc = yield from asyncio.create_subprocess_exec('ping', '-c', '3', ip_addr)
      ret_code = yield from proc.wait()
      if ret_code != 0:
          print("ip:%s doesn't responding" % ip_addr)
          # Do some staff
          yield from asyncio.sleep(2)
          # Do more staff
          yield from asyncio.sleep(16)
  
  
  @asyncio.coroutine
  def run_probing():
  
      print('Start probing')
      # Do some staff
      yield from asyncio.sleep(1)
  
      while True:
          yield from asyncio.wait([prob_ip('192.168.1.3'), prob_ip('192.168.1.2')])
          yield from asyncio.sleep(60)
  
  
  def main():
      parser = argparse.ArgumentParser()
      parser.description = "Probing ip."
      parser.parse_args()
  
      signal.signal(signal.SIGINT, my_handler)
      signal.signal(signal.SIGTERM, my_handler)
  
      asyncio.get_event_loop().run_until_complete(run_probing())
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>When i run it via:</p>
  
  <pre><code>python3 test1.py
  </code></pre>
  
  <p>It stops by Ctrl-C without any warnings.
  But when I run it via:</p>
  
  <pre><code>python3 -m test1
  </code></pre>
  
  <p>It prints warning by Ctrl-C:</p>
  
  <pre><code>$ python3 -m test1 
  Start probing
  Ping ip:192.168.1.2
  Ping ip:192.168.1.3
  PING 192.168.1.2 (192.168.1.2): 56 data bytes
  PING 192.168.1.3 (192.168.1.3): 56 data bytes
  ^C--- 192.168.1.2 ping statistics ---
  --- 192.168.1.3 ping statistics ---
  1 packets transmitted, 0 packets received, 100% packet loss
  1 packets transmitted, 0 packets received, 100% packet loss
  Stopping
  Task was destroyed but it is pending!
  task: &lt;Task pending coro=&lt;prob_ip() running at /tmp/test1.py:22&gt; wait_for=&lt;Future pending cb=[Task._wakeup()]&gt; cb=[_wait.&lt;locals&gt;._on_completion() at /usr/lib/python3.4/asyncio/tasks.py:394]&gt;
  Task was destroyed but it is pending!
  task: &lt;Task pending coro=&lt;prob_ip() running at /tmp/test1.py:22&gt; wait_for=&lt;Future pending cb=[Task._wakeup()]&gt; cb=[_wait.&lt;locals&gt;._on_completion() at /usr/lib/python3.4/asyncio/tasks.py:394]&gt;
  </code></pre>
  
  <p>Same warning I get if I install this script via:</p>
  
  <pre><code>from setuptools import setup
  
  setup(name='some_scripts',
        version='1.0.0.0',
        author='Some Team',
        author_email='team@team.ru',
        url='https://www.todo.ru',
        description='Some scripts',
        packages=['my_package'],
        entry_points={'console_scripts': [
            'test1=my_package.test1:main',
        ]},
        )
  </code></pre>
  
  <p>My python version is "3.4.2"</p>