[fpc-pascal] Linux - ExecuteProcess versus fpSystem
Anton Shepelev
anton.txt at gmail.com
Fri Sep 9 10:09:31 CEST 2011
Andrew Haines:
> I suspect that the oggenc command is failing
> because TProcess behind the scenes is splitting
> --output="outputfile.ogg" into two params.
Yes, indeed. It is also mentioned on the WIKI:
http://wiki.freepascal.org/Executing_External_Programs
(see section
"Parameters which contain spaces (Replacing Shell Quotes)"
While the documentation on TProcess and fpExecV is
more ambiguous:
TProcess:
If the command to be executed or any of the
arguments contains whitespace (space, tab
character, linefeed character) it should be
enclosed in single or double quotes.
fpExecV:
In case ComLine is a single string, it will
be split out in an array of strings, taking
into account common whitespace and quote
rules.
Anton
More information about the fpc-pascal
mailing list