In Windows 8.1 i am testing (also win10), in fpc 3.3.1 Getting output of console project by using TProcess, It hang on reading from pipe, to test it just use RunCommand with small exe (you can build pascal with hello world), it hang and without result of output string.
while it is work find in fpc 3.0.4
Please test it and confirm maybe I am wrong.
After digging in process.pp of 3.3.1, I found the problem in
Function GetCreationFlags(P : TProcessnamemacro) : Cardinal;
begin
With P do
begin
Result:=CREATE_UNICODE_ENVIRONMENT;
if poNoConsole in Options then
Result:=Result or CREATE_NO_WINDOW; <- here
if poNewConsole in Options then
Result:=Result or Create_new_console;
if poNewProcessGroup in Options then
Result:=Result or CREATE_NEW_PROCESS_GROUP;
If poRunSuspended in Options Then
Result:=Result or Create_Suspended;
if poDebugProcess in Options Then
Result:=Result or DEBUG_PROCESS;
if poDebugOnlyThisProcess in Options Then
Result:=Result or DEBUG_ONLY_THIS_PROCESS;
if poDefaultErrorMode in Options Then
Result:=Result or CREATE_DEFAULT_ERROR_MODE;
result:=result or PriorityConstants[FProcessPriority];
end;
end;
if poNoConsole in Options then
Result:=Result or CREATE_NO_WINDOW;
in 3.0.4 it is DETACHED_PROCESS , replacing CREATE_NO_WINDOW with DETACHED_PROCESS solves the probelm
if poNoConsole in Options then
Result:=Result or DETACHED_PROCESS;
Please test before reporting a bug