]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: (monitor) improve test output
authorKarel Zak <kzak@redhat.com>
Wed, 3 Jun 2026 11:54:20 +0000 (13:54 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 3 Jun 2026 11:54:20 +0000 (13:54 +0200)
Ensure the output is not lost when redirecting stdout.

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/monitor.c

index 02de06c847bec1c67ecd9dca05491f82b062b0cf..e99607a3c9ccb7394c22825422a29dddb5782ff3 100644 (file)
@@ -607,6 +607,7 @@ static int __test_epoll(struct libmnt_test *ts __attribute__((unused)),
                        continue;
 
                printf(" top-level FD active\n");
+               fflush(stdout);
                if (cleanup)
                        mnt_monitor_event_cleanup(mn);
                else {
@@ -628,6 +629,7 @@ static int __test_epoll(struct libmnt_test *ts __attribute__((unused)),
                                                        mnt_fs_is_moved(fs) ? "MOVED" : "???");
                                        }
                                }
+                               fflush(stdout);
                        }
                }
        } while (1);