[Python-checkins] r79633 - in python/trunk: Doc/library/os.rst Doc/library/signal.rst Doc/library/subprocess.rst Lib/subprocess.py Lib/test/test_os.py Lib/test/win_console_handler.py Lib/unittest/test/test_break.py Modules/posixmodule.c Modules/s

Brian Curtin brian.curtin at gmail.com
Sat Apr 3 15:59:21 CEST 2010


On Sat, Apr 3, 2010 at 00:48, Georg Brandl <g.brandl at gmx.net> wrote:

> Am 03.04.2010 01:26, schrieb brian.curtin:
>
> > Modified: python/trunk/Modules/posixmodule.c
> >
> ==============================================================================
> > --- python/trunk/Modules/posixmodule.c        (original)
> > +++ python/trunk/Modules/posixmodule.c        Sat Apr  3 01:26:06 2010
> > @@ -4075,6 +4075,53 @@
> >  }
> >  #endif
> >
> > +#ifdef MS_WINDOWS
> > +PyDoc_STRVAR(win32_kill__doc__,
> > +"kill(pid, sig)\n\n\
> > +Kill a process with a signal.");
> > +
> > +static PyObject *
> > +win32_kill(PyObject *self, PyObject *args)
> > +{
> > +     PyObject *result, handle_obj;
> > +     DWORD pid, sig, err;
> > +     HANDLE handle;
> > +
> > +     if (!PyArg_ParseTuple(args, "kk:kill", &pid, &sig))
> > +             return NULL;
> > +
> > +     /* Console processes which share a common console can be sent
> CTRL+C or
> > +        CTRL+BREAK events, provided they handle said events. */
> > +     if (sig == CTRL_C_EVENT || sig == CTRL_BREAK_EVENT) {
> > +             if (GenerateConsoleCtrlEvent(sig, pid) == 0) {
> > +                     err = GetLastError();
> > +                     PyErr_SetFromWindowsErr(err);
> > +             }
> > +             else
> > +                     Py_RETURN_NONE;
> > +     }
>
> Isn't there a return missing in the error case?
>
> Georg
>

Fixed in r79673. Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-checkins/attachments/20100403/470db39b/attachment-0001.html>


More information about the Python-checkins mailing list