lineedit: don't violate API if we do simple fgets

ash: cosmetic style fixes, no code changes
This commit is contained in:
Denis Vlasenko
2007-12-09 10:03:28 +00:00
parent a96425fe82
commit 9cb220be9d
2 changed files with 7 additions and 5 deletions

View File

@@ -8553,7 +8553,7 @@ preadfd(void)
goto retry;
}
if (nr < 0 && errno == 0) {
/* Ctrl+D presend */
/* Ctrl+D pressed */
nr = 0;
}
}
@@ -8564,8 +8564,8 @@ preadfd(void)
if (nr < 0) {
if (parsefile->fd == 0 && errno == EWOULDBLOCK) {
int flags = fcntl(0, F_GETFL);
if (flags >= 0 && flags & O_NONBLOCK) {
flags &=~ O_NONBLOCK;
if (flags >= 0 && (flags & O_NONBLOCK)) {
flags &= ~O_NONBLOCK;
if (fcntl(0, F_SETFL, flags) >= 0) {
out2str("sh: turning off NDELAY mode\n");
goto retry;