mirror of
https://github.com/python/cpython.git
synced 2025-10-21 22:22:48 +00:00
Port #1220212 (os.kill for Win32) to py3k.
This commit is contained in:
parent
b2416e54b1
commit
eb24d7498f
10 changed files with 200 additions and 6 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "intrcheck.h"
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
#include <Windows.h>
|
||||
#ifdef HAVE_PROCESS_H
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
@ -805,6 +806,18 @@ PyInit_signal(void)
|
|||
PyDict_SetItemString(d, "ItimerError", ItimerError);
|
||||
#endif
|
||||
|
||||
#ifdef CTRL_C_EVENT
|
||||
x = PyLong_FromLong(CTRL_C_EVENT);
|
||||
PyDict_SetItemString(d, "CTRL_C_EVENT", x);
|
||||
Py_DECREF(x);
|
||||
#endif
|
||||
|
||||
#ifdef CTRL_BREAK_EVENT
|
||||
x = PyLong_FromLong(CTRL_BREAK_EVENT);
|
||||
PyDict_SetItemString(d, "CTRL_BREAK_EVENT", x);
|
||||
Py_DECREF(x);
|
||||
#endif
|
||||
|
||||
if (PyErr_Occurred()) {
|
||||
Py_DECREF(m);
|
||||
m = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue