+void xt_notify_end_process(XtPointer client, int *fid,
+ XtInputId *id)
+{
+ wxLocalProcessData *process_data = (wxLocalProcessData *)client;
+
+ int pid;
+
+ pid = (process_data->pid > 0) ? process_data->pid : -(process_data->pid);
+
+ /* wait4 is not part of any standard, use at own risk
+ * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
+ * --- offer@sgi.com */
+#if !defined(__sgi) && !defined(__SGI__) && !defined(__ALPHA__) && !defined(__SUNCC__)
+ wait4(process_data->pid, NULL, 0, NULL);
+#else
+ wait3((int *) NULL, 0, (rusage *) NULL);
+#endif
+
+ XtRemoveInput(*id);
+ if (process_data->process)
+ process_data->process->OnTerminate(process_data->pid);
+
+ process_data->end_process = TRUE;
+
+ if (process_data->pid > 0)
+ delete process_data;
+ else
+ process_data->pid = 0;