+#if wxUSE_STREAMS
+ delete m_inputStream;
+ delete m_errorStream;
+ delete m_outputStream;
+#endif // wxUSE_STREAMS
+}
+
+void wxProcess::OnTerminate(int pid, int status)
+{
+ wxProcessEvent event(m_id, pid, status);
+
+ if ( !ProcessEvent(event) )
+ delete this;
+ //else: the object which processed the event is responsible for deleting
+ // us!
+}
+
+void wxProcess::Detach()
+{
+ SetNextHandler(NULL);
+}
+
+// ----------------------------------------------------------------------------
+// process IO redirection
+// ----------------------------------------------------------------------------
+
+#if wxUSE_STREAMS
+
+void wxProcess::SetPipeStreams(wxInputStream *inputSstream,
+ wxOutputStream *outputStream,
+ wxInputStream *errorStream)
+{
+ m_inputStream = inputSstream;
+ m_errorStream = errorStream;
+ m_outputStream = outputStream;
+}
+
+bool wxProcess::IsInputOpened() const
+{
+ return m_inputStream && m_inputStream->GetLastError() != wxSTREAM_EOF;