Fix commented out error handling
Oops. Had commented it out so I could attach a debugger without exiting on EINTR.master
parent
6323ca0209
commit
a1bb27ae01
2
chat.c
2
chat.c
|
@ -145,7 +145,7 @@ static char *prompt(const char *prompt) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
ssize_t len = getline(&line, &cap, stdin);
|
ssize_t len = getline(&line, &cap, stdin);
|
||||||
//if (ferror(stdin)) err(EX_IOERR, "getline");
|
if (ferror(stdin)) err(EX_IOERR, "getline");
|
||||||
if (feof(stdin)) exit(EX_OK);
|
if (feof(stdin)) exit(EX_OK);
|
||||||
if (len < 2) continue;
|
if (len < 2) continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue