[fpc-pascal] Linux - ExecuteProcess versus fpSystem

Marco van de Voort marcov at stack.nl
Thu Sep 8 19:07:45 CEST 2011


In our previous episode, Anton Shepelev said:
> In the case of ExecuteProcess() parameter separation
> takes place on FPC side, while with  fpSystem()  the
> shell  is  responsible for it.

Executeprocess has two forms. One does parameter separation,
and one not, and directly passes the separated parameters to 
fpexec.

This was actually the reason for executeprocess.

>  Could a problem with
> FPC's  parameter  separation  algorithm  be  causing
> this?

Maybe, but only when you use the wrong variant.

> Can you post both the commands you are executing?

Yes, that would be the best.

> When I was learing processes, I wrote a unit to exe-
> cute  a   command   using   fpExecv   --   just   as
> ExecuteProcess() does. I'll dig it out and we'll see
> how (and whether) it works with your examples.
 
There should be no need for that. 



More information about the fpc-pascal mailing list