diff options
author | Donald Johnson <kandiyohi.snow@gmail.com> | 2018-05-29 19:25:46 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2018-05-30 13:32:30 -0400 |
commit | 51ba6124f513c500511d842158fff433f5fec0f8 (patch) | |
tree | 955e009a107c5ea300af0b315f7b3ba0c7657782 | |
parent | 6f630d32bf494a457171b3f99e329592497bf271 (diff) |
Add line buffering to udevadm monitor outputeudev/master
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | src/udev/udevadm-monitor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udev/udevadm-monitor.c b/src/udev/udevadm-monitor.c index 15ded09339..fa4a4ab9a0 100644 --- a/src/udev/udevadm-monitor.c +++ b/src/udev/udevadm-monitor.c @@ -156,6 +156,9 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) { sigaddset(&mask, SIGTERM); sigprocmask(SIG_UNBLOCK, &mask, NULL); + /* output each event as it happens via line buffering */ + setlinebuf(stdout); + fd_ep = epoll_create1(EPOLL_CLOEXEC); if (fd_ep < 0) { log_error_errno(errno, "error creating epoll fd: %m"); |