(I came looking for the processutils zip, and saw that there was a post that I missed.
Note that Mantis #22055 got reported in the meanwhile IMHO a pretty serious bug in tprocess wrt exitcodes on *nix.
)
That was a comment on a .commandline issue.
Since with "parameter" style quoting, the quoting is less important, this might not apply there.
OK. I'll create a mantis issue regarding the discrepancy between documentation and windows implementation for TProcess.Parameters.
(that turned out that Ludo used parameters.text to set the result, which only has the most basic quoting. I assumed he used parameters.add)
True. That is the whole point, the whole "type and validate in the shell" principle is flawed.
I couldn't agree more.
What I'm saying is that the common case (external command + parameters) represents the vast majority of the usage cases and should and can be made as simple as possible for the programmer to call from a program
If it is a "simple" case, it will work with .text
. Once you get into shell internal commands, piping, tees, whatever shell extension, the programmer should take full responsability for the conversion to (kernel) api calls. IMHO the current TProcess is trying to find a compromise which doesn't satisfy both edges of the spectrum. The cross-platform objective for TProcess is obviously complicating things a lot.
The latter for sure. The quoting also complicated a lot, and lead to TProcess being broken in several releases, and it has been a festering wound for a decade now. Enough is enough.
And I really don't think using .add like syntax in common cases is that bad, though I would have prefered a more open array way to set it.
For windows we are now in the situation that the programmer is expected to split the command line in executable and parameters + unquote parameters.
If he already has it, which is typically only during the transition time.
TProcess will then maybequote all elements and serialize everything again before the call to the createprocess api. That is what I would call a loose-loose situation.
I honestly don't see the big problem.