[Chicago] Popen/subprocess/Poll Question.

Martin Maney maney at two14.net
Thu Jul 22 17:28:44 CEST 2010


On Thu, Jul 22, 2010 at 09:55:24AM -0500, Samir Faci wrote:
> I'm running a process that's usually takes a while.... (in the best
> case scenario a few hours... going on days occasionally)
> 
> I'm presuming I need to spawn a thread for the process so it doesn't block.

Thread-on-the-brain disease?  Why not run it as a separate process? 
Threads are just processes that can mess each other up almost without
trying.  :-/

> Now, what I'm trying to accomplish is to have it print its output to a
> screen AND let me capture its output.  I'd like to see the output.
> I'd also like to see the output as its processing, not capture it, and
> print it to screen and then write to file.

There's an Anciente Unixe command that does this very thing, named
"tee".  Just sayin'

-- 
I'm not proud.  We really haven't done everything we could to
protect our customers ... Our products just aren't engineered
for security.  -- Brian Valentine, Microsoft Senior VP
                  in charge of the Windows development team



More information about the Chicago mailing list