udev: Line buffer 'udev monitor' output (#3733)
Callers of the 'udev monitor' tool expect to see output when an event occurs. The stdio buffering defeats that. This patch switches it to line buffering.
This commit is contained in:
parent
b010a6a1ae
commit
8d00539d99
|
@ -151,6 +151,9 @@ static int adm_monitor(struct udev *udev, int argc, char *argv[]) {
|
|||
sigaddset(&mask, SIGTERM);
|
||||
sigprocmask(SIG_UNBLOCK, &mask, NULL);
|
||||
|
||||
/* Callers are expecting to see events as they happen: Line buffering */
|
||||
setlinebuf(stdout);
|
||||
|
||||
fd_ep = epoll_create1(EPOLL_CLOEXEC);
|
||||
if (fd_ep < 0) {
|
||||
log_error_errno(errno, "error creating epoll fd: %m");
|
||||
|
|
Loading…
Reference in a new issue