+ 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;
+}
+
+bool wxProcess::IsInputAvailable() const
+{
+ return m_inputStream && m_inputStream->CanRead();
+}