- wxEndProcessData *proc_data = (wxEndProcessData*)data;
- wxLogDebug(wxT("Wow.. this actually worked!"));
- int status = 0;
- int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
- if(!rc)
- {
- wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
- return;
- }
- if((rc != -1) && WIFEXITED(status))
- proc_data->exitcode = WEXITSTATUS(status);
- else
- proc_data->exitcode = -1;
- wxHandleProcessTermination(proc_data);
+ wxEndProcessData *proc_data = (wxEndProcessData*)data;
+ wxLogDebug(wxT("Wow.. this actually worked!"));
+ int status = 0;
+ int rc = waitpid(abs(proc_data->pid), &status, WNOHANG);
+ if(!rc)
+ {
+ wxLogDebug(wxT("Mach port was invalidated, but process hasn't terminated!"));
+ return;
+ }
+ if((rc != -1) && WIFEXITED(status))
+ proc_data->exitcode = WEXITSTATUS(status);
+ else
+ proc_data->exitcode = -1;
+ wxHandleProcessTermination(proc_data);