You are not logged in.
Pages: 1
Hi,
With the last updates the following returns -1 where in the past the result was 0.
res:=RunCommand(apppath+'test.exe',false);
The test.exe is started ok even with the -1 result
Offline
You call RunCommand() with waitfor = false, so we call CreateProcessW() and we don't wait for completion.
So the returned value is no true ExitCode but just a CreateProcessW() success flag.
We should return 0 on success for sure. Thanks for the report!
I have restored the previous behavior.
Please try
https://github.com/synopse/mORMot2/commit/de2fdbbec
Offline
Hi ab and dcoun,
just a hint - the winapi has a error code for this, but i understand that it is maybe a "breaking change" for existing apps that rely on the status=0 for successful process-creation.
STILL_ACTIVE = STATUS_PENDING;
https://learn.microsoft.com/en-us/windo … odeprocess
But maybe i'am wrong with the usage for this purpose.
Last edited by tfopc (Yesterday 20:04:22)
Offline
Pages: 1