This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Meng-Yuan Huang
Recipients Meng-Yuan Huang, paul.moore, steve.dower, tim.golden, zach.ware
Date 2015-12-28.07:48:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451288899.74.0.53616811767.issue25962@psf.upfronthosting.co.za>
In-reply-to
Content
My OS is Windows 10 Pro 64-bit. My Python version is 3.5.1 64-bit.
I wrote a simple script (t.py, see the attached file) with multiprocessing.Pool and run it by:
python t.py
in Windows Command Prompt.
I tried to interrupt the running script by pressing Ctrl+C keys. Python showed the message:
-----------------------------------
Work Started: 21360
Process SpawnPoolWorker-1:
Traceback (most recent call last):
  File "d:\Anaconda3\lib\multiprocessing\process.py", line 254, in _bootstrap
    self.run()
  File "d:\Anaconda3\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "d:\Anaconda3\lib\multiprocessing\pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\myh\Documents\Python Scripts\t.py", line 7, in do_work
    1
KeyboardInterrupt
-----------------------------------

However, it didn't terminate Python and come back to Windows Command Prompt. It just hang there.
Then, I pressed another Ctrl+C. Python showed:
-----------------------------------
Process SpawnPoolWorker-2:
Traceback (most recent call last):
  File "d:\Anaconda3\lib\multiprocessing\process.py", line 254, in _bootstrap
    self.run()
  File "d:\Anaconda3\lib\multiprocessing\process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "d:\Anaconda3\lib\multiprocessing\pool.py", line 108, in worker
    task = get()
  File "d:\Anaconda3\lib\multiprocessing\queues.py", line 343, in get
    res = self._reader.recv_bytes()
  File "d:\Anaconda3\lib\multiprocessing\connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "d:\Anaconda3\lib\multiprocessing\connection.py", line 306, in _recv_bytes
    [ov.event], False, INFINITE)
KeyboardInterrupt
-----------------------------------

Unfortunately, it still didn't terminate Python and come back to Windows Command Prompt!
However, I run the same script with Python 3.5.1 64-bit on a CetnOS 7 64-bit,
it can terminate Python and come back to the terminal.

Is this a bug on Windows?
History
Date User Action Args
2015-12-28 07:48:19Meng-Yuan Huangsetrecipients: + Meng-Yuan Huang, paul.moore, tim.golden, zach.ware, steve.dower
2015-12-28 07:48:19Meng-Yuan Huangsetmessageid: <1451288899.74.0.53616811767.issue25962@psf.upfronthosting.co.za>
2015-12-28 07:48:19Meng-Yuan Huanglinkissue25962 messages
2015-12-28 07:48:17Meng-Yuan Huangcreate