-// this function is called to associate the port-specific callback with the
-// child process. The return valus is port-specific.
-extern int wxAddProcessCallback(wxEndProcessData *proc_data, int fd);
-// For ports (e.g. DARWIN) which can add callbacks based on the pid
-extern int wxAddProcessCallbackForPid(wxEndProcessData *proc_data, int pid);
+ // the pid of the child process
+ int pid;
+
+ // The exit code of the process, set once the child terminates.
+ int exitcode;
+
+ // the associated process object or NULL
+ wxProcess *process;
+
+ // Local event loop used to wait for the child process termination in
+ // synchronous execution case. We can't create it ourselves as its exact
+ // type depends on the application kind (console/GUI), so we rely on
+ // wxAppTraits setting up this pointer to point to the appropriate object.
+ wxEventLoopBase *syncEventLoop;
+
+#if wxUSE_STREAMS
+ // the input buffer bufOut is connected to stdout, this is why it is
+ // called bufOut and not bufIn
+ wxStreamTempInputBuffer bufOut,
+ bufErr;
+
+ // the corresponding FDs, -1 if not redirected
+ int fdOut,
+ fdErr;
+#endif // wxUSE_STREAMS
+
+
+private:
+ // SIGCHLD signal handler that checks whether any of the currently running
+ // children have exited.
+ static void OnSomeChildExited(int sig);
+
+ // All currently running child processes indexed by their PID.
+ //
+ // Notice that the container doesn't own its elements.
+ WX_DECLARE_HASH_MAP(int, wxExecuteData*, wxIntegerHash, wxIntegerEqual,
+ ChildProcessesData);
+ static ChildProcessesData ms_childProcesses;
+
+ wxDECLARE_NO_COPY_CLASS(wxExecuteData);
+};