Issue #207 resolved

cli.exe quits on ctrl-c, but python doesn't

Guy Rozendorn
created an issue

(originally sumbitted to setuptools: http://bugs.python.org/setuptools/issue120)

the cli should use SetConsoleCtrlHandler to ignore CTRL-C and pass it to its child process

The idea is to set an internal control event handler, rather than using the default one (that kills the cli). the new handler should pass the ctrl-c event to the python child pid, by using GenerateConsoleCtrlEvent. the new handler is set by using SetConsoleCtrlHandler.

so you need a control handler function, and to set it up. you also need the child pid (to send the ctrl-c to), but spawnv doesn't return it. so you also need to move to CreateProcessA and WaitForSingleObject. in order to use CreateProcess, you need to convert ptr and newchars into one big char*.

Comments (6)

  1. Guy Rozendorn reporter

    The issue207.patch contains an updated sourcecode and makefile for the cli, an update to easy_install that in run-time chooses the right {cli,gui}-{32,64}.exe. unlike before, the four files need to be in the repository

    also, i looked at setup.py, it seems that the new class build_py is never called. so why's is the code there?

    how do I run the tests to make sure I didn't break anything?

  2. Log in to comment