importsfromgooglecode / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

pychess should handle SIGTERM #615

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run pychess
2. pkill pychess

What is the expected output? What do you see instead?
Should behave the same way as when pychess is started from the terminal and 
then Ctrl-C'ed from the shell: the child processes should be cleaned up.

Instead, they are left running, consuming 100% CPU.

Did you use PyChess from a repo, tarball, install or hg?
repo: Fedora, over several pychess releases up to 0.10rc1

Please attach the latest pychess logfile from ~/.pychess
No log file

Please use labels and text to provide additional information.
See Fedora bug report https://bugzilla.redhat.com/show_bug.cgi?id=563668

Original issue reported on code.google.com by Michael....@gmail.com on 16 Nov 2010 at 12:00

GoogleCodeExporter commented 9 years ago
We have

def run (args):
    ...
    signal.signal(signal.SIGINT, gtk.main_quit)
    def cleanup ():
        SubProcess.finishAllSubprocesses()
    atexit.register(cleanup)
    ...

In the end of Main.py

Adding support for SIGTERM is probably a simple matter of adding

    signal.signal(signal.SIGTERM, gtk.main_quit)

After the SIGINT line.

Original comment by lobais on 16 Nov 2010 at 5:45

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 4 Dec 2010 at 10:18