Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Long Process Waits Until End to Display Results

by C_T (Scribe)
on Dec 07, 2004 at 18:26 UTC ( [id://412965]=note: print w/replies, xml ) Need Help??


in reply to Re: Long Process Waits Until End to Display Results
in thread Long Process Waits Until End to Display Results

make sure whenever your actually print the output that $| is set to a true value.

I have done this. Like you, this is something I used in most of my scripts.

Second, it could be in the $my_long_process program. Many programs, and the default stdio library, buffer output unless it's to a tty. If that's the case with $my_long_process program, it wouldn't buffer output when you ran it from the command-line (because it was connected to a tty), but would when run from your program. You might be able to test by running: $my_long_program |cat

It still gave me real-time feedback when run piped into cat as you suggested.

CT

Charles Thomas
Madison, WI
  • Comment on Re^2: Long Process Waits Until End to Display Results

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412965]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found