Skip to main content

Timeline for Follow a pipe using less?

Current License: CC BY-SA 3.0

16 events
when toggle format what by license comment
Jan 21, 2017 at 11:44 comment added mik @PiotrDobrogost yes, it would block waiting for new data or EOF, but my point is that the screen does not need to be updated during this waiting (just because there is no new data)
Jan 19, 2017 at 13:36 comment added Piotr Dobrogost @mik And here, we are interested in the no data case. Earlier you wrote *After pressing F or G on pipe input less not only does a blocking read, but does it in a loop waiting for EOF. * My point is that even if there was no waiting for EOF less would block on read after it had read all data from pipe.
Jan 19, 2017 at 13:11 comment added mik @PiotrDobrogost with blocking read less wouldn't be able to update screen, if there is no data; when some data appear, blocking read will return it, and less would be able to update screen without a separate thread
Jan 19, 2017 at 10:10 comment added Piotr Dobrogost @mik If less would update screen in that loop, there would not be a problem. Blocking read has little to do with this issue. If the read were blocking then less wouldn't be able to update screen unless the read was in a different thread, would it?
Jun 27, 2016 at 9:21 comment added mik @Flow this is not a hang the question was about, but merely a wait which is expected in this situation - a wait for more data in the file when EOF is reached (which will not happen for a closed pipe, by the way), or for an interrupt to exit the follow mode
Jun 23, 2016 at 12:03 comment added Flow If the input is a pipe, less hangs until the pipe is closed on the other side. That's not my observation. For example echo foo |less +F results in less displaying Waiting for data... (interrupt to abort), so it does not hang until the pipe is closed, but until an interrupt is received.
Feb 12, 2015 at 22:46 comment added mik If less would update screen in that loop, there would not be a problem. Blocking read has little to do with this issue.
Feb 12, 2015 at 22:29 comment added mik After pressing F or G on pipe input less not only does a blocking read, but does it in a loop waiting for EOF. And an EOF on a pipe happens only if its other side is closed.
Dec 11, 2014 at 11:24 comment added Piotr Dobrogost If the input is a pipe, less hangs until the pipe is closed on the other side. That's kind of misleading statement. What happens is that less calls read in a blocking mode, waiting for new data or or pipe's closure.
Oct 29, 2014 at 19:38 vote accept haelix
Jun 27, 2014 at 8:37 history edited mik CC BY-SA 3.0
minor grammatic improvements
Jun 26, 2014 at 9:06 history edited jasonwryan CC BY-SA 3.0
Grammar and formatting
S Jun 26, 2014 at 8:21 review Late answers
Jun 26, 2014 at 9:06
S Jun 26, 2014 at 8:21 review First posts
Jun 26, 2014 at 8:27
Jun 26, 2014 at 8:07 history edited mik CC BY-SA 3.0
added 6 characters in body
Jun 26, 2014 at 8:02 history answered mik CC BY-SA 3.0