Fix wxExecute() default priority if wxProcess is not used.

The code mistakenly assigned the lowest possible priority (0, in wx's
numbering), while the intention probably was to have the same default as
wxProcess, which is 0 in POSIX numbering and 50== wxPRIORITY_DEFAULT in
wx's.

Fixes permission denied errors if lowering priority is not permitted.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2013-10-07 11:43:06 +00:00
parent 36656b6ce2
commit d92a17f52d

View File

@ -627,7 +627,7 @@ long wxExecute(char **argv, int flags, wxProcess *process,
// 1. wxPRIORITY_{MIN,DEFAULT,MAX} map to -20, 0 and 19 respectively.
// 2. The mapping is monotonously increasing.
// 3. The mapping is onto the target range.
int prio = process ? process->GetPriority() : 0;
int prio = process ? process->GetPriority() : wxPRIORITY_DEFAULT;
if ( prio <= 50 )
prio = (2*prio)/5 - 20;
else if ( prio < 55 )