+
+// ----------------------------------------------------------------------------
+// process killing
+// ----------------------------------------------------------------------------
+
+/* static */
+wxKillError wxProcess::Kill(int pid, wxSignal sig, int flags)
+{
+ wxKillError rc;
+ (void)wxKill(pid, sig, &rc, flags);
+
+ return rc;
+}
+
+/* static */
+bool wxProcess::Exists(int pid)
+{
+ switch ( Kill(pid, wxSIGNONE) )
+ {
+ case wxKILL_OK:
+ case wxKILL_ACCESS_DENIED:
+ return true;
+
+ default:
+ case wxKILL_ERROR:
+ case wxKILL_BAD_SIGNAL:
+ wxFAIL_MSG( wxT("unexpected wxProcess::Kill() return code") );
+ // fall through
+
+ case wxKILL_NO_PROCESS:
+ return false;
+ }
+}
+