diff options
author | 2018-05-29 19:25:46 -0500 | |
---|---|---|
committer | 2018-05-30 13:32:30 -0400 | |
commit | 51ba6124f513c500511d842158fff433f5fec0f8 (patch) | |
tree | 955e009a107c5ea300af0b315f7b3ba0c7657782 /src | |
parent | man: add short options to udevd.xml; update udev.7 (diff) | |
download | eudev-51ba6124f513c500511d842158fff433f5fec0f8.tar.gz eudev-51ba6124f513c500511d842158fff433f5fec0f8.tar.bz2 eudev-51ba6124f513c500511d842158fff433f5fec0f8.zip |
Add line buffering to udevadm monitor output
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src')
-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 15ded0933..fa4a4ab9a 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"); |