wxKILL_ERROR // another, unspecified error
};
+enum wxKillFlags
+{
+ wxKILL_NOCHILDREN = 0, // don't kill children
+ wxKILL_CHILDREN = 1 // kill children
+};
+
+
enum wxSignal
{
wxSIGNONE = 0, // verify if the process exists under Unix
%}
-%name(Process)class wxPyProcess : public wxEvtHandler {
+%rename(Process) wxPyProcess;
+class wxPyProcess : public wxEvtHandler {
public:
// 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
static bool Exists(int pid);
// under Unix, if the process is the group leader then killing -pid kills
// all children as well as pid
- wxEXEC_MAKE_GROUP_LEADER = 4
+ wxEXEC_MAKE_GROUP_LEADER = 4,
+
+ // by default synchronous execution disables all program windows to avoid
+ // that the user interacts with the program while the child process is
+ // running, you can use this flag to prevent this from happening
+ wxEXEC_NODISABLE = 8
};
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 %{
wxPyPtrTypeMap_Add("wxProcess", "wxPyProcess");