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

Denys Vlasenko vda.linux at googlemail.com
Sun Jan 23 23:06:37 UTC 2011


On Sunday 23 January 2011 21:55, Peter Korsgaard wrote:
> >>>>> "Denys" == Denys Vlasenko <vda.linux at googlemail.com> writes:
> 
> Hi,
> 
>  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.

It also breaks -t SEC option.

-- 
vda


More information about the busybox mailing list