Yoshinori K. Okuji wrote:
On Sunday 10 February 2008 13:55, Robert Millan wrote:
We could make the behaviour be, that if ESC is pressed at any time before
an input line is completed, the operation is aborted, read returns
non-zero, and it doesn't save the line to any variable.  What do you think?

Not bad. :)

:)

In GRUB Legacy, the hidden menu uses ESC, because if it uses ENTER, and
the user pushes ENTER too long, and a key repeat occurs, then the first
item may be selected quick as a flash. But we could avoid this problem by
vacuuming all inputs before showing a menu, so it might be acceptable to
use ENTER instead.
This is still error-prone.  Even if you vacuum the input buffer, we still
have a race between user unholding ENTER and GRUB showing the menu. Vacuuming the buffer just gives us more time, but doesn't garantee good
results.

Sure, but I think it would be good enough in reality.

most realities.  Probably it will bite someone some day.

A 1/10th second delay or so after display before listening for input might reduce the chances of that, though increase the very same chances of the enter-press for the menu being intentional but dropped.

-Isaac


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to