[PATCH] getty: Wait until all output written to stdout has been transmitted

Peter Korsgaard jacmet at sunsite.dk
Sat Jan 22 12:20:48 UTC 2011


>>>>> "Denys" == Denys Vlasenko <vda.linux at googlemail.com> writes:

Hi,

 Denys> On Thursday 20 January 2011 09:54, Michal Simek wrote:
 >> Problem was observed on a Xilinx Microblaze system with console on mdm
 >> IP (which is very slow), where part of the console output wasn't shown.
 >> 
 >> Calling tcdrain() instead of tcflush() fixes the problem.

 Denys> But it may lead to a hang if serial line gets mangled:
 Denys> in some situations tcdrain may wait forever.

With flow control, you mean?

Why is the tcflush/tcdrain needed in the first place?

 Denys> I propose adding sleep(1) before the flush.
 Denys> Can you verify that it works?

I don't have the hw, Michal?

-- 
Bye, Peter Korsgaard


More information about the busybox mailing list