diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-04-13 11:25:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-04-17 14:33:11 +0200 |
commit | 2099a9e58d640b4ecb70c22d11d4d2f9366dbf57 (patch) | |
tree | e9fc76ee1f4b6f39bc009882ce43ec835431fddd | |
parent | abbfa8fdfa5a01edbe72619c407cc9da2d7c1693 (diff) | |
download | systemd-2099a9e58d640b4ecb70c22d11d4d2f9366dbf57.tar.gz |
fileio: extend comment a bit
(cherry picked from commit 451fcbfc58d3ccb9855095666aa9ba4ae1327224)
-rw-r--r-- | src/basic/fileio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 818f9cc0e0..ec9d76688d 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -1046,9 +1046,11 @@ int read_line_full(FILE *f, size_t limit, ReadLineFlags flags, char **ret) { count++; if (eol != EOL_NONE) { - /* If we are on a tty, we can't wait for more input. But we expect only - * \n as the single EOL marker, so there is no need to wait. We check - * this condition last to avoid isatty() check if not necessary. */ + /* If we are on a tty, we can't shouldn't wait for more input, because that + * generally means waiting for the user, interactively. In the case of a TTY + * we expect only \n as the single EOL marker, so we are in the lucky + * position that there is no need to wait. We check this condition last, to + * avoid isatty() check if not necessary. */ if ((flags & (READ_LINE_IS_A_TTY|READ_LINE_NOT_A_TTY)) == 0) { int fd; |