Skip to content

Commit 451fcbf

Browse files
committed
fileio: extend comment a bit
1 parent 609ae0f commit 451fcbf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/basic/fileio.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,9 +1084,11 @@ int read_line_full(FILE *f, size_t limit, ReadLineFlags flags, char **ret) {
10841084
count++;
10851085

10861086
if (eol != EOL_NONE) {
1087-
/* If we are on a tty, we can't wait for more input. But we expect only
1088-
* \n as the single EOL marker, so there is no need to wait. We check
1089-
* this condition last to avoid isatty() check if not necessary. */
1087+
/* If we are on a tty, we can't shouldn't wait for more input, because that
1088+
* generally means waiting for the user, interactively. In the case of a TTY
1089+
* we expect only \n as the single EOL marker, so we are in the lucky
1090+
* position that there is no need to wait. We check this condition last, to
1091+
* avoid isatty() check if not necessary. */
10901092

10911093
if ((flags & (READ_LINE_IS_A_TTY|READ_LINE_NOT_A_TTY)) == 0) {
10921094
int fd;

0 commit comments

Comments
 (0)