X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..72625b36b6fdaea839a5132e8f5d52dea7155bec:/src/common/process.cpp?ds=sidebyside diff --git a/src/common/process.cpp b/src/common/process.cpp index ec9686c965..0e09eb7506 100644 --- a/src/common/process.cpp +++ b/src/common/process.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// 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 @@ -50,6 +50,7 @@ void wxProcess::Init(wxEvtHandler *parent, int id, int flags) m_id = id; m_pid = 0; + m_priority = wxPRIORITY_DEFAULT; m_redirect = (flags & wxPROCESS_REDIRECT) != 0; #if wxUSE_STREAMS @@ -104,7 +105,7 @@ void wxProcess::Detach() { // 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); @@ -176,3 +177,10 @@ bool wxProcess::Exists(int pid) } } +void wxProcess::SetPriority(unsigned priority) +{ + wxCHECK_RET( priority <= wxPRIORITY_MAX, + wxS("Invalid process priority value.") ); + + m_priority = priority; +}