[p4] Terminal output in p4v tools
Gross, Steve
SGross at sjm.com
Mon Nov 12 13:28:47 PST 2007
Hi folks. I had an interesting problem that you might find handy: my
custom tool generates a lot of output (both to stdout and stderr) during
an execution time of 10+ seconds. However, the p4v terminal window only
displayed ALL of the output at the END of execution, rather than
delivering the messages one by one as they occurred.
This had the unfortunate effect of making users wonder whether the
program was running at all! That is, they would spawn the tool, get an
empty terminal window, and no output for awhile. Ack!
I found an interesting solution: after every message is delivered (er,
printed) to stdout or stderr in my tool, I flush the appropriate buffer.
This works like a charm!
Interesting, huh?
--Steve
More information about the perforce-user
mailing list