summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-13 11:25:43 +0200
committerLennart Poettering <lennart@poettering.net>2020-04-13 11:27:31 +0200
commit451fcbfc58d3ccb9855095666aa9ba4ae1327224 (patch)
tree21892bfc3632e3f87fc3aa944ccc55d621d8f4ae
parent609ae0f59619619efe6db07e34f73a237e7f332b (diff)
downloadsystemd-451fcbfc58d3ccb9855095666aa9ba4ae1327224.tar.gz
fileio: extend comment a bit
-rw-r--r--src/basic/fileio.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c
index 463a8596f5..34ee939526 100644
--- a/src/basic/fileio.c
+++ b/src/basic/fileio.c
@@ -1084,9 +1084,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;