]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fileio: extend comment a bit
authorLennart Poettering <lennart@poettering.net>
Mon, 13 Apr 2020 09:25:43 +0000 (11:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 13 Apr 2020 09:27:31 +0000 (11:27 +0200)
src/basic/fileio.c

index 463a8596f5a719c2745cf9ef6f43f9ce11133c50..34ee939526f9b43b8ca8d29c1d277d56d903601a 100644 (file)
@@ -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;