Hi all,
I quote a discussion between myself and Philip while we were working
OKWIN - which I would like the list to comment on please.

Just to clarify utils.execute is two functions which wrap around
tprocess, the first uses it with waitOnExit and returns a TStringList
with OutPut, the second does not use waitOnExit, it just launches the
subprocess (making it functionally equivalent to shell, but with
tprocess as the enabling mechanism)
The unix unit Shell function can be used. I've seen so many bug reports
and questions related to TProcess that I'm not confident it works
correctly, whereas I've used Shell on OS X and Linux.
Well I know that as of FPC 2.1.4 the compiler actually generates a
warning if you use the shell function that it is deprecated, I think a
lot of the issues with tprocess relates to using it wrong, on the
other lazarus uses it for both debugging and launching the compiler -
as far as I know it's the only way to (cleanly) catch the console
output of a subprocess.
On the other hand, I have had reasons to suspect some bugs in it
(frequent badWindow crashes when launching graphical apps with it), so
perhaps it's use should be limited to the SECOND overloaded
utils.execute - which grabs output, and for straight launches we
should use shell and shellExecute as appropriate ?
I think I will post this question to the list and get the general feel
from those who know the internals well.

What is the consensus please ?

A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to