forked from Bananymous/banan-os
Shell: Handle keyboard input that was interrupted by signal
This commit is contained in:
parent
1c78671078
commit
56008869d6
|
@ -908,7 +908,19 @@ int main(int argc, char** argv)
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
uint8_t ch = getchar();
|
int chi = getchar();
|
||||||
|
if (chi == EOF)
|
||||||
|
{
|
||||||
|
if (errno == EINTR)
|
||||||
|
{
|
||||||
|
clearerr(stdin);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
perror("getchar");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t ch = chi;
|
||||||
|
|
||||||
if (waiting_utf8 > 0)
|
if (waiting_utf8 > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue