New submission from guo tie:

I wrote those test python code as following:

import signal
import time
import os

def handler(signum, frame):
    print "do whatever, like call thread.interrupt_main()"
    return

signal.signal(signal.SIGINT, handler)

while 1:
    try:
        time.sleep(10)
    except:
        os.kill(int(os.getpid()), signal.SIGINT)
        pass


when i excute this test code on windows, the process print "do whatever, like 
call thread.interrupt_main()", then exit;
on linux, it works correctly.

why on windows it not work?

----------
components: Windows
messages: 192722
nosy: guo.tie
priority: normal
severity: normal
status: open
title: signal.SIGINT in windows cause process exit directly.
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18411>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to