FS#17832 - udevadm monitor doesn't work with shell pipes

Attached to Project: Arch Linux
Opened by Stanislav GE (giner) - Thursday, 14 January 2010, 09:22 GMT
Last edited by Thomas Bächler (brain0) - Thursday, 14 January 2010, 22:10 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

udevadm monitor doesn't work with shell pipes
nothing go to a pipe while proccess is running, but it goes after udevadm killing

Additional info:
* package version(s): udev 146-2

Steps to reproduce:
udevadm monitor | cat (or grep or tee or something else) - doesn't work
udevadm monitor > monitor.log - doesn't work too
This task depends upon

Closed by  Thomas Bächler (brain0)
Thursday, 14 January 2010, 22:10 GMT
Reason for closing:  Not a bug
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 14 January 2010, 15:07 GMT
There is no bug here: stdout is block buffered when points to a file, but if points to a terminal is line buffered
Comment by Stanislav GE (giner) - Thursday, 14 January 2010, 15:13 GMT
Can I change this behaviour?
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 14 January 2010, 15:59 GMT
As far as I know, without modifiying the program no.
But maybe for your purpose you can execute udevadm monitor with the command: script -c "udevadm monitor" -f monitor.log
Comment by Stanislav GE (giner) - Thursday, 14 January 2010, 21:11 GMT
Hm, I think it isn't the best way but enough for my issue. Thank you.
I was using udevmonitor before and it was working well with pipes. But after that udevmonitor was replaced by udevadm.
What the reason do you think of behaviour of udevadm such as?
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 14 January 2010, 22:04 GMT
Maybe some code paths changed on it. If you are interested can see the code and compare it, if there are any setvbuf() fflush() or something ;)

Loading...