Re: How to watch and read a file that another process is appending to?
On Wed, Jul 25, 2018 at 08:06:39PM +0200, Carlo Wood wrote: > > can you please answer this question that I posted on > Stack Overflow: Sure. I have tried to give abit of background to help in udnerstanding these rather difficult problems, hope it helps! -- The choice of a Deliantra, the free code+content MORPG -==- _GNU_ http://www.deliantra.net ==-- _ generation ---==---(_)__ __ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schm...@schmorp.de -=/_/_//_/\_,_/ /_/\_\ ___ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/mailman/listinfo/libev
How to watch and read a file that another process is appending to?
Hi, can you please answer this question that I posted on Stack Overflow: https://stackoverflow.com/questions/51524848/how-to-read-a-nonblocking-filedescriptor-of-a-file-that-is-appended-to-aka-lik Quote: When I add a watcher to read a file and all data has been read then I do get a call back that there is data to read, but read(2) returns 0 (EOF). At that point I have to stop the watcher or else it will continue to tell me that there is something to read. However, if I stop the watcher and then some other process appends data to that file then I'll never see it. What is the correct way to get notified that there is additional/appended data in a file that can be read when before I already read till the end? -- Carlo Wood ___ libev mailing list libev@lists.schmorp.de http://lists.schmorp.de/mailman/listinfo/libev