[Dart] compile output

Blezek, Daniel J (CRD) blezek at crd.ge.com
Tue, 22 Jan 2002 10:57:23 -0500


Great suggestion!  [read stdin] isn't the best thing, as it will block until the process is done, and
then spit out the whole thing, but we can make this work...  I'm on it...

-dan

> -----Original Message-----
> From: Amitha Perera [mailto:perera at cs.rpi.edu]
> Sent: Tuesday, January 22, 2002 10:54 AM
> To: Bill Hoffman
> Cc: dart at public.kitware.com
> Subject: Re: [Dart] compile output
> 
> 
> But it's not difficult to write a small script to emulate it's
> functionality:
> 
> cat.tcl:
>   #!/usr/local/bin/tclsh8.3
>   puts [read stdin]
> 
> 
> munge.tcl:
>   set f [open "|process |& cat.tcl" "r"]
>   set all_process_out [ read $f ]
> 
> 
> Amitha.
> 
> 
> On Tue, Jan 22, 2002 at 10:44:13AM -0500, Bill Hoffman wrote:
> > Cat is not standard on windows and can not be used.
> > 
> > -Bill
> > 
> > 
> > At 10:38 AM 1/22/2002 -0500, Amitha Perera wrote:
> > >On Tue, Jan 22, 2002 at 10:10:44AM -0500, Blezek, Daniel J (CRD)
> > >wrote:
> > >>   I tried to do this, but Tcl just doesn't support the proper
> > >> mechanisms.  While you can fork the process off, there 
> is no way to
> > >> monitor it to see when it's finished.  Another approach 
> is to open
> > >> the build process as a pipe, and read from it, but only 
> stdout can
> > >> be read in this way, stderr must go to a file, and we loose the
> > >> interleaving to associate an error with a file.
> > >
> > >I think something like the following will work, if you 
> want to capture
> > >both streams:
> > >
> > >  set f [open "|yourprocess |& cat" "r"]
> > >
> > >where cat is the standard Unix process that reads stdin 
> and spits out
> > >to stdout. (At least, it works under Unix.) 
> _______________________________________________
> Dart mailing list
> Dart at public.kitware.com
> http://public.kitware.com/mailman/listinfo/dart
>