summaryrefslogtreecommitdiff
path: root/packages/fcl-process
diff options
context:
space:
mode:
authormarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-08-29 10:00:36 +0000
committermarco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2>2018-08-29 10:00:36 +0000
commit1727bd855cc3121677bd7d9ce0201acce56e6017 (patch)
tree3793f934470e7b9bea07797fb0cbaa7ec894e453 /packages/fcl-process
parente7feeeffd456ae9db38ae8144c96d46827ddc11b (diff)
downloadfpc-1727bd855cc3121677bd7d9ce0201acce56e6017.tar.gz
* two new priority classes for all but wince. See comments in process.pp
* some left over changes to RunCommandEventCode in preparation of more events. git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39681 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-process')
-rw-r--r--packages/fcl-process/src/process.pp7
-rw-r--r--packages/fcl-process/src/unix/process.inc3
-rw-r--r--packages/fcl-process/src/win/process.inc3
3 files changed, 9 insertions, 4 deletions
diff --git a/packages/fcl-process/src/process.pp b/packages/fcl-process/src/process.pp
index 179482efa7..07d2a84999 100644
--- a/packages/fcl-process/src/process.pp
+++ b/packages/fcl-process/src/process.pp
@@ -36,11 +36,14 @@ Type
TStartupOption = (suoUseShowWindow,suoUseSize,suoUsePosition,
suoUseCountChars,suoUseFillAttribute);
- TProcessPriority = (ppHigh,ppIdle,ppNormal,ppRealTime);
+ // only win32/64 and wince uses this. wince doesn't have the constants in the headers for the latter two.
+ // unix defines them (as nice levels?), but doesn't use them.
+ TProcessPriority = (ppHigh,ppIdle,ppNormal,ppRealTime{$ifndef wince},ppBelowNormal,ppAboveNormal{$endif});
TProcessOptions = set of TProcessOption;
TStartupOptions = set of TStartupOption;
- TRunCommandEventCode = (RunCommandIdle,RunCommandReadOutput,RunCommandFinished,RunCommandException);
+ TRunCommandEventCode = (RunCommandIdle,RunCommandReadOutputString,RunCommandReadOutputStream,RunCommandFinished,RunCommandException);
+ TRunCommandEventCodeSet = set of TRunCommandEventCode;
TOnRunCommandEvent = procedure(Sender,Context : TObject;Status:TRunCommandEventCode;const Message:string) of object;
EProcess = Class(Exception);
diff --git a/packages/fcl-process/src/unix/process.inc b/packages/fcl-process/src/unix/process.inc
index 8db10c7c64..442c68411b 100644
--- a/packages/fcl-process/src/unix/process.inc
+++ b/packages/fcl-process/src/unix/process.inc
@@ -26,8 +26,9 @@ Resourcestring
SErrCannotCreatePipes = 'Failed to create pipes';
Const
+ // unused as of yet, I assume these are nice levels ?
PriorityConstants : Array [TProcessPriority] of Integer =
- (20,20,0,-20);
+ (-10,19,0,-20,5,-5); // was (20,20,0,-20) before introduction of last two levels.
Const
GeometryOption : String = '-geometry';
diff --git a/packages/fcl-process/src/win/process.inc b/packages/fcl-process/src/win/process.inc
index be1981e206..6a58cbdaf4 100644
--- a/packages/fcl-process/src/win/process.inc
+++ b/packages/fcl-process/src/win/process.inc
@@ -25,7 +25,8 @@ Resourcestring
Const
PriorityConstants : Array [TProcessPriority] of Cardinal =
(HIGH_PRIORITY_CLASS,IDLE_PRIORITY_CLASS,
- NORMAL_PRIORITY_CLASS,REALTIME_PRIORITY_CLASS);
+ NORMAL_PRIORITY_CLASS,REALTIME_PRIORITY_CLASS,
+ BELOW_NORMAL_PRIORITY_CLASS,ABOVE_NORMAL_PRIORITY_CLASS);
procedure TProcessnamemacro.CloseProcessHandles;
begin