On Monday 24 January 2011 00:06, Denys Vlasenko wrote: > On Sunday 23 January 2011 21:55, Peter Korsgaard wrote: > > >>>>> "Denys" == Denys Vlasenko <[email protected]> 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.
I committed a fix with usleep(100*1000) for now - it's better than what we have now. If you feel strongly about needing alarm-based fix, please send a patch for review. -- vda _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
