
Dear Simon,
In message CAPnjgZ15jrh=-tEj-0tFjwBSZyq+0BihKJLEjG3d43wQOowMFg@mail.gmail.com you wrote:
If this happens, I consider it a bug that should be fixed, and not papered over.
If you look at the code for the 'md' command it calls ctrlc() every now and then. Each call results in a getc() which reads a character from the console. So we lose characters.
Well, as I mentioned: it looks like a bug that needs fixing.
I dislike this idea. It looks wrong to me. Can we not fix the problem at the root cause?
I certainly thought about this. I even though maybe we might change the serial module to scan ahead and buffer characters, in case there is a Ctrl-C in the future. But that itself seems like something for the future.
well, I see two sides of this:
1) Looking at sandbox only, we should provide an implementation of ctrlc() that does not consume characters from stdin - I thinkwe should rather be able to react on signals?
2) With a general point of view, consuming characters for no good is always wrong and needs to be fixed.
Best regards,
Wolfgang Denk