Skip to content

Commit

Permalink
Add line buffering to udevadm monitor output
Browse files Browse the repository at this point in the history
Signed-off-by: Anthony G. Basile <[email protected]>
  • Loading branch information
kandiyohi authored and blueness committed May 30, 2018
1 parent 6f630d3 commit 51ba612
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/udev/udevadm-monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 51ba612

Please sign in to comment.