On Tue, 8 Jan 2008, A.J. Venter wrote:

> Hi all,
> I am having an immensely weird problem with newest lazarus (which was
> definitely not there before).
> The problem affects only code that makes use of tprocess to get output from a
> shell-script and feed it back as a function result.
> It is triggered whenever stdout of the main program is piped. Whether to a
> file with > or to a program with |
> For some reason the output from tprocess is suddenly all messed up and ends up
> being random lines from my program's output.
> 
> This is rather disturbing as I have a large amount of debug info which gets
> constantly dumped to stdout to allow me to track the process of the program
> and identify problems with the implementation as it runs. But, should I try to
> log this data with a pipe, or to seek out a specific fragment with grep,
> suddenly the tprocess function gets completely confused and I end up with
> random strings from my own output dumped where the output of a shell-script is
> meant to be.
> 
> What could cause this ? A stack overflow in the tprocess ? Any idea where I
> should look ? Was something in tprocess changed recently ?

Nothing was changed.
Can you please give some sample code? It's hard to say something in general.

Note that > or  | cannot be used unless you invoke the shell with a
commandline like
/bin/sh -c "your command > yourfile"

Michael.

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

Reply via email to