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

Peter Korsgaard jacmet at sunsite.dk
Sun Jan 23 20:55:12 UTC 2011

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


 Rich> Is there a reason you're not considering the alarm approach?
 Rich> alarm+drain will not hang at all if the buffer drains immediately.
 Rich> sleep+flush or usleep+flush will *always* sleep at least some
 Rich> interval, which is annoying to the user.
 >> Indeed. It seems vastly superior, and only slightly more complicated.

 Denys> What happened to "we are busybox, we like simple solutions"?
 Denys> Rob periodically grills me that I am making it too complicated...

I agree that we shouldn't make stuff too complicated - E.G. lets not add
config options to make the user choose if he wants tcdrain or the amount
of time to sleep before tcflush, but E.G. my 4-line alarm() + tcdrain
patch doesn't add much complexity (and it's all local), and it solves a
real world issue.

Bye, Peter Korsgaard

More information about the busybox mailing list