Add flags parameter to wx.Process.Kill and wx.Kill
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -219,6 +219,8 @@
|
|||||||
%rename(KILL_ACCESS_DENIED) wxKILL_ACCESS_DENIED;
|
%rename(KILL_ACCESS_DENIED) wxKILL_ACCESS_DENIED;
|
||||||
%rename(KILL_NO_PROCESS) wxKILL_NO_PROCESS;
|
%rename(KILL_NO_PROCESS) wxKILL_NO_PROCESS;
|
||||||
%rename(KILL_ERROR) wxKILL_ERROR;
|
%rename(KILL_ERROR) wxKILL_ERROR;
|
||||||
|
%rename(KILL_NOCHILDREN) wxKILL_NOCHILDREN;
|
||||||
|
%rename(KILL_CHILDREN) wxKILL_CHILDREN;
|
||||||
%rename(SIGNONE) wxSIGNONE;
|
%rename(SIGNONE) wxSIGNONE;
|
||||||
%rename(SIGHUP) wxSIGHUP;
|
%rename(SIGHUP) wxSIGHUP;
|
||||||
%rename(SIGINT) wxSIGINT;
|
%rename(SIGINT) wxSIGINT;
|
||||||
@@ -242,6 +244,7 @@
|
|||||||
%rename(EXEC_NOHIDE) wxEXEC_NOHIDE;
|
%rename(EXEC_NOHIDE) wxEXEC_NOHIDE;
|
||||||
%rename(EXEC_MAKE_GROUP_LEADER) wxEXEC_MAKE_GROUP_LEADER;
|
%rename(EXEC_MAKE_GROUP_LEADER) wxEXEC_MAKE_GROUP_LEADER;
|
||||||
%rename(Execute) wxExecute;
|
%rename(Execute) wxExecute;
|
||||||
|
%rename(Kill) wxKill;
|
||||||
%rename(JOYSTICK1) wxJOYSTICK1;
|
%rename(JOYSTICK1) wxJOYSTICK1;
|
||||||
%rename(JOYSTICK2) wxJOYSTICK2;
|
%rename(JOYSTICK2) wxJOYSTICK2;
|
||||||
%rename(JOY_BUTTON_ANY) wxJOY_BUTTON_ANY;
|
%rename(JOY_BUTTON_ANY) wxJOY_BUTTON_ANY;
|
||||||
|
@@ -39,6 +39,13 @@ enum wxKillError
|
|||||||
wxKILL_ERROR // another, unspecified error
|
wxKILL_ERROR // another, unspecified error
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum wxKillFlags
|
||||||
|
{
|
||||||
|
wxKILL_NOCHILDREN = 0, // don't kill children
|
||||||
|
wxKILL_CHILDREN = 1 // kill children
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
enum wxSignal
|
enum wxSignal
|
||||||
{
|
{
|
||||||
wxSIGNONE = 0, // verify if the process exists under Unix
|
wxSIGNONE = 0, // verify if the process exists under Unix
|
||||||
@@ -74,7 +81,9 @@ IMP_PYCALLBACK_VOID_INTINT( wxPyProcess, wxProcess, OnTerminate);
|
|||||||
%name(Process)class wxPyProcess : public wxEvtHandler {
|
%name(Process)class wxPyProcess : public wxEvtHandler {
|
||||||
public:
|
public:
|
||||||
// kill the process with the given PID
|
// kill the process with the given PID
|
||||||
static wxKillError Kill(int pid, wxSignal sig = wxSIGTERM);
|
static wxKillError Kill(int pid,
|
||||||
|
wxSignal sig = wxSIGTERM,
|
||||||
|
int flags = wxKILL_NOCHILDREN);
|
||||||
|
|
||||||
// test if the given process exists
|
// test if the given process exists
|
||||||
static bool Exists(int pid);
|
static bool Exists(int pid);
|
||||||
@@ -166,6 +175,18 @@ long wxExecute(const wxString& command,
|
|||||||
wxPyProcess *process = NULL);
|
wxPyProcess *process = NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%typemap(in,numinputs=0) wxKillError* rc ( wxKillError temp ) { $1 = &temp; }
|
||||||
|
%typemap(argout) wxKillError* rc
|
||||||
|
{
|
||||||
|
PyObject* o;
|
||||||
|
o = PyInt_FromLong((long) (*$1));
|
||||||
|
$result = t_output_helper($result, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError* rc, int flags = wxKILL_NOCHILDREN);
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
%init %{
|
%init %{
|
||||||
wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess");
|
wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess");
|
||||||
|
Reference in New Issue
Block a user