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

Cathey, Jim jcathey at ciena.com
Mon Jan 24 20:57:24 UTC 2011

I'm just trying to point out that it seems to me that
the iceberg has knocked a big ol' hole in the side of
the ship, the deck chair placement isn't really going
to matter in the end.

There's a fundamental conflict between how the serial
port is being used in this scenario, versus how the
getty tool was designed to be used.  Getty assumes that
it owns the serial port, and that what preceded it does
not matter.  In large part to avoid getting stuck due
to flow control, big wads o' crap that were sent at the
wrong baud rate, etc.

If the _system_ assumes that the kernel (uboot, etc.) has
already set up the port and has perhaps issued tres important
stuff out it, then it should either not call getty, arrange
to wait for drainage before it does, or give getty an
argument that tells it never to discard anything.  No amount
of tinkering with delays and such will make all such
(mis-)uses happy, attention should be focused on solving
the underlying problem.  (Which is that getty throws this
stuff away for a reason!)

-- Jim

More information about the busybox mailing list