A/UX: Output Is Lost in "term" and X11


Article Change History
----------------------
08/31/92 - REVIEWED
*For technical accuracy

The following problem indicates a bug in A/UX. The following small program
produces a list of 10,000 lines when run:

#include <stdio.h>

main()
{
int i;

for (i=1; i<10000; i++) {
printf ("i=%d\\n",i);
}
}

This works as expected when running on the console or as single process in
"term". However, when this program is started three times in different
windows of "term", the output is garbled. When tested under X11, the output is
also garbled.

Tech Comm has verified this problem on both the Toolbox application "term"
program and the X Window System "xterm" program. Some of the standard
output of the program from the last window(s) are lost, if more than two
windows (either created by "term" or "xterm") run the test program.

The problem can be reproduced and easily seen by outputting a longer
string, like "i=====", through the printf() statement.


It seems that both "term" and "xterm" window programs have some limitation
on the synchronization of each terminal emulation output. They just do the
normal asynchronous terminal output.

However, you may use the "tee" pipe-fitting command to block the standard
output on the display without losing any output. For example:

foo | tee [file]

This lets the output of the program "foo" be displayed on the standard
output and/or copied to the file, if the optional file is specified.

The problem described in this article has been submitted as a bug to A/UX
Engineering.


Published Date: Feb 18, 2012