Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Append a tools status to the command line..

by kappa (Chaplain)
on Apr 16, 2002 at 14:47 UTC ( #159504=note: print w/replies, xml ) Need Help??

in reply to Append a tools status to the command line..

This can be accomplished via special buffer file, as stephen and others sugessted. The long-running program should update the file periodically, and the shell will read the file and insert the contents into the prompt.

Another way will let you avoid periodic writes of current progress and employs fifos or named pipes. This isn't easier to implement and won't probably run much faster, but is indeed a different way to do it.

You should arrange a progress-writer thread (or process, but this will make the whole thing even more evil) which will just write current progress into a fifo in an endless loop. Remember, if there's no reader on the other end of the fifo, then the writer will block until the reader emerges.

  • Comment on Re: Append a tools status to the command line..

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2020-02-25 22:29 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (113 votes). Check out past polls.