Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Marco van de Voort
Op 7/19/2020 om 5:40 PM schreef Bo Berglund via fpc-pascal: On Sun, 19 Jul 2020 08:46:14 +0200 (CEST), Michael Van Canneyt wrote: Various RunCommand procedures in process unit: https://www.freepascal.org/docs-html/current/fcl/process/runcommand.html But it looks like it hangs around until t

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Michael Van Canneyt
On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: On Sun, 19 Jul 2020 17:51:59 +0200 (CEST), Michael Van Canneyt wrote: On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: On Sun, 19 Jul 2020 08:46:14 +0200 (CEST), Michael Van Canneyt wrote: Various RunCommand procedures in p

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Bo Berglund via fpc-pascal
On Sun, 19 Jul 2020 17:51:59 +0200 (CEST), Michael Van Canneyt wrote: > > >On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: > >> On Sun, 19 Jul 2020 08:46:14 +0200 (CEST), Michael Van Canneyt >> wrote: >> >>> Various RunCommand procedures in process unit: >>> https://www.freepascal.org/doc

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Michael Van Canneyt
On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: On Sun, 19 Jul 2020 08:46:14 +0200 (CEST), Michael Van Canneyt wrote: Various RunCommand procedures in process unit: https://www.freepascal.org/docs-html/current/fcl/process/runcommand.html But it looks like it hangs around until the

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Bo Berglund via fpc-pascal
On Sun, 19 Jul 2020 08:46:14 +0200 (CEST), Michael Van Canneyt wrote: >Various RunCommand procedures in process unit: >https://www.freepascal.org/docs-html/current/fcl/process/runcommand.html > But it looks like it hangs around until the started process exits... How can I set a timeout on the ex

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Bo Berglund via fpc-pascal
On Sun, 19 Jul 2020 10:55:56 +0200 (CEST), Michael Van Canneyt wrote: >> These are used exactly 1 time each in the full application... > >All the more reason to dispense with the unit. >Less code to maintain. > Seems like RunCommandInDir or simply RunCommand can do what the ExecWait with all its

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Michael Van Canneyt
On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: or use TProcess. https://www.freepascal.org/docs-html/current/fcl/process/tprocess.html OK, thanks. Then I will have to make a rewrite of the unit... Possibly add IFDEF:s such that the Windows version remains and I create equivalents

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-19 Thread Bo Berglund via fpc-pascal
On Sun, 19 Jul 2020 08:46:14 +0200 (CEST), Michael Van Canneyt wrote: > > >On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: > >> I am porting an old application from Delphi to Lazarus and Windows to >> Linux. >> This application has a unit ExecWait, which was created to simplify >> running

Re: [fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-18 Thread Michael Van Canneyt
On Sun, 19 Jul 2020, Bo Berglund via fpc-pascal wrote: I am porting an old application from Delphi to Lazarus and Windows to Linux. This application has a unit ExecWait, which was created to simplify running tool programs from the main program, so it supplies two procedures as: function ExecA

[fpc-pascal] CrossPlatform problem, INFINITE not defined on Linux

2020-07-18 Thread Bo Berglund via fpc-pascal
I am porting an old application from Delphi to Lazarus and Windows to Linux. This application has a unit ExecWait, which was created to simplify running tool programs from the main program, so it supplies two procedures as: function ExecAndWait(Cmdline: string; Hide: boolean = false; MaxWait: DWOR