Zitat von Graeme Geldenhuys <[email protected]>:
Mattias Gaertner wrote:
It is a bug in fcl-process/src/unix/process.inc proc CommandToList
used by TProcess. It only removes the outer ".
I copied the CommandToList() from process.inc to my own test application
and named it MyCommandToList().
I then passed the lProcess.CommandLine to that function with a
stringlist, and then did a writeln() of MyStringList.Text.
Below is the output and it looks correct to me? I'm using FPC 2.3.1
(fixes_2_4 branch) of yesterday.
$ ./project1
/usr/bin/gnome-terminal
--title="Thread Monitor - project1"
--command="watch -n.1 'ps -C project1 -L -o pid,tid,pcpu,state'"
And that is wrong. This is the command as given to a shell, which
removes the outer level " and ' and then executes it.
TProcess only removes the ",' if the parameter starts with a ",'.
Mattias
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus