On Sun, Jan 23, 2011 at 03:39:02PM +0100, Denys Vlasenko wrote: > On Sun, Jan 23, 2011 at 11:28 AM, Michal Simek <mon...@monstr.eu> wrote: > > Give me what I should test and I will do it. > > Insert sleep(1) before tcflush(0, TCIOFLUSH) in termios_init in getty.c, > and let us know whether the "getty nukes a few last output chars sent > before it is started" problem has been fixed by it. > > If it does, experiment with smaller sleeps - use usleep(MICROSECONDS) - > and let us know what minimal pause is enough. Also let us know > the settings on the serial line (primarily baud rate). If you can use > different ones, experiment with smallest available. > > There is already another sleep(1) in getty, in get_logname - can you > experiment with lowering it too?
Is there a reason you're not considering the alarm approach? alarm+drain will not hang at all if the buffer drains immediately. sleep+flush or usleep+flush will *always* sleep at least some interval, which is annoying to the user. Rich _______________________________________________ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox