/////////////////////////////////////////////////////////////////////////////
-// Name: process.cpp
+// Name: src/common/process.cpp
// Purpose: Process termination classes
// Author: Guilhem Lavaux
// Modified by: Vadim Zeitlin to check error codes, added Detach() method
void wxProcess::Detach()
{
- SetNextHandler(NULL);
+ // we just detach from the next handler of the chain (i.e. our "parent" -- see ctor)
+ // not also from the previous handler like wxEvtHandler::Unlink() would do:
+
+ if (m_nextHandler)
+ m_nextHandler->SetPreviousHandler(m_previousHandler);
+
+ m_nextHandler = NULL;
}
// ----------------------------------------------------------------------------
default:
case wxKILL_ERROR:
case wxKILL_BAD_SIGNAL:
- wxFAIL_MSG( _T("unexpected wxProcess::Kill() return code") );
+ wxFAIL_MSG( wxT("unexpected wxProcess::Kill() return code") );
// fall through
case wxKILL_NO_PROCESS: