[Python-Dev] About SSL tests
jcarlson at uci.edu
Tue Apr 3 22:37:52 CEST 2007
"Steven Bethard" <steven.bethard at gmail.com> wrote:
> On 4/3/07, Christian Heimes <lists at cheimes.de> wrote:
> > > I'd be willing to look at adding it, if the group thinks it's the right
> > > thing to do.
> > I like the idea and I'm proposing to add two more methods to subprocess
> > Popen.
> > class Popen(...):
> > ...
> > def signal(self, signal):
> > """Send a signal to the process (UNIX only)
> > signal is constant from the signal module
> > """
> > def terminate(self, force=False):
> > """Terminate the process
> > On UNIX terminate(False) is equivalent to signal(SIGTERM) and
> > terminate(True) to signal(SIGKILL).
> > On Windows ... (does Windows support a forced terminate?)
> > """
> Another difference I believe is that TerminateProcess on Windows
> doesn't kill the tree of processes like kill would. It would be nice
> if Popen.terminate() did the same thing on both Unix and Windows. (I
> assume that would mean making *all* the appropriate TerminateProcess
To kill child processes on Windows, one must walk the tree and kill
those as well. wxWidgets has an implementation in src/msw/utils.cpp:
See the differences between wxKill and wxKillAllChildren . I would also
mention that wxWidgets implements SIGKILL as TerminateProcess(), and
SIGTERM as sending a QUIT message to the process.
More information about the Python-Dev