[fpc-pascal] Linux - ExecuteProcess versus fpSystem

Marco van de Voort marcov at stack.nl
Sat Sep 17 17:48:25 CEST 2011

In our previous episode, cobines said:
> > I have created issue # 0020279.
> If this must be like shell quoting 

These routines were never meant to be shell quoting (which is silly since
it is a Runtime lib call, not a shell). I also don't see the point why it
should be expanded to do shell quoting.

The original executeprocess was made as replacement for dos.exec, which was
before 1.9.2 the only portable way to call a function, but had a 255 char

The original string,string version of executeprocess solved that, and to
better suit Unix, a version with an open array was made because it suits
Unix api conventions (execve) more, and because since the Unix restructure
that option was open.

So basically this bugreport is about adding *nix shell quoting to a routine
that was meant to mimic WINDOWS API (iow not even Windows shell) behaviour.

Some minor quoting support that was already there was added for easy
conversion, but I'm very reluctant to expand that and get even more corner

I added comments to that end to above bugreport.

More information about the fpc-pascal mailing list