[U-Boot] [PATCH 2/4] Add ctrlc_ignore environment variable to ignore Ctrl-C
Wolfgang Denk
wd at denx.de
Tue Jun 10 07:08:12 CEST 2014
Dear Simon,
In message <CAPnjgZ2BC0MD6NyoOJRmhYeabm3EYMBs8nQA3hcyD71BB+jqDw at mail.gmail.com> you wrote:
>
> > 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?
>
> Currently there is no signal handling, but we set up the terminal so
> that Cltr-C terminates U-Boot (default) or does not (and it appears as
> a character in the input). It's probably a bit more complicated but it
> should be doable. We can probably just ignore Cltl-C on sandbox for
> now.
Hm... ignoring it would mean there is no way to interrupt long running
commands. I'm not sure if this is actually an improvement.
Eventually we should try to define the wanted behaviour first.
My initial feelingis that ^C should terminate a running command nd
return us to the shell, but not terminate U-Boot. Outside of sandbox,
the only regular way to terminate U-Boot is the "reboot" command.
Maybe we should do the same in sandbox?
> > 2) With a general point of view, consuming characters for no good is
> > always wrong and needs to be fixed.
>
> I'm not sure if you recall the serial driver buffer patch I sent for
I'm afraid I don't.
> ns16550 which corrected this problem and also dealt with serial input
> overflow while outputting to the LCD. We might consider resurrecting
> this and doing it at a higher level. Without buffering I don't see any
> way to fix this.
The 16550 is on the high end side in terms of capabilities. I don;t
thinkwe should "buffer" more than a single character - otherwise it
would be just a tiny step to implementing thingslike line disciplines
and stuff, and I don;t think we need nor want this.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Science makes godlike -- it is all over with priests and gods when
man becomes scientific. Moral: science is the forbidden as such -- it
alone is forbidden. Science is the *first* sin, the *original* sin.
*This alone is morality.* ``Thou shalt not know'' -- the rest
follows." - Friedrich Nietzsche
More information about the U-Boot
mailing list