| hobbs | (yet) |
| merlyn | we're solving the problem by going up a level, remember don't lock in that level of solutio you might have an XY here. |
| perlygatekeeper | Merlyn! |
| merlyn | or perhaps an XYZ :) perlygatekeeper! :) |
| weary | going up a level requires lots of people to co-operate.. |
| hobbs | perhaps even a pgk |
| zakame | layers of cake :) |
| integral | The best solution obviously is to get syslog to fork an new instance of perl on every single message. (sigh) |
| weary | i'll just go think of something completely else. thanks for your help! |
| merlyn | maybe if you explain precisely why you need to wake up out of nowhere repeatedly, and find the last line of a file, we could help that just seems like having to reproduce a lot of work each time when it should be something that just lives in a long-running daemon |
| integral | hmm, isn't that what tail -f does? and File::Tail? And that Poe tail wheel thing |
| merlyn | the latter, yes he's sayign he doesn't want a long-running daemon |
| action | integral is surprised linux still doesn't have a waitfornewdataonfile syscall yet |
| integral | is surprised linux still doesn't have a waitfornewdataonfile syscall yet |
| weary | i need something that opens a file, reads the last B bytes, finds the last line in the bytes, if it needs removing resize the file. |
| LeoNerd | integral: dnotify? |
| integral | hmm, maybe! |
| LeoNerd | Oh except it's called inotify now |
| merlyn | what if you're trying to remove it while something else wants to write something new? |
| integral | oh, I thought inotify was the old name, doh. |
| merlyn | how do you get exclusive access to the file? |
| LeoNerd | inotify is really what you want.. it's entirely suited to this |
| integral | there's already programs that do log rotation |
| LeoNerd | inotify is the new system, that gets around issues with the old one dnotify watches filehandles. |
| weary | merlyn: err, good point |
| LeoNerd | inotify can do names, too |
| integral | iirc the issue was having an insanely sucky interface |
| merlyn | so my guess is that really, you'll be copying this file to another place |
| LeoNerd | You can be informed when a filename gets created, unlinked,.. renamed... as well as all the data stuff within one filehandle |
| merlyn | in which case, you'll want a long-runing daemon and then, you can use File::Tail |
| LeoNerd | inotify is very shiney :) |
| weary | no, that's not going to work (for non-programming related reasons). I'll go think up something else. |
| merlyn | it can't possibly be any better. :) |