From d92a17f52d50776795113eed7c6199b460740f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 7 Oct 2013 11:43:06 +0000 Subject: [PATCH] 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 --- src/unix/utilsunx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 98548a2e3f..0900587706 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -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 )