dialogs are being double-drawn

I've noticed that dialogs are being double-drawn. It takes a LOT of time when running over a 115200 UART.

To reproduce:

compile this up (I called it test.c -> test):

#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>

int main(int argc, const char *argv[])
{
    char buf[1]; ssize_t len, ret;
    while (true) {
            ret = read(0, &buf, 1);
            if (ret <= 0)
                    break;
            len = ret;
            ret = write(1, &buf, len);
            if (ret <= 0)
                    break;
            usleep(1000);
    }
}
  • compile bsddialog
  • pipe it through the test program
$ ./bsddialog --msgbox "Hello world" 8 20 | /home/adrian/test
Edited by adrian chadd