bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rollover translator


From: Danilo Segan
Subject: Re: rollover translator
Date: Sun, 31 Oct 2004 14:39:49 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Today at 9:09, Alfred M. Szmidt wrote:

> I like this idea too, for real log files this has more sense.  But I
> am not sure at all how one would go about to implement.
>
> When one writes N bytes to the file when at the end of the file, one
> would somehow have to remove the N top bytes, and push all contents up
> N bytes and then start writting those N bytes.  And this would have to
> be done all the time when writting.

Ok, I don't know exactly what translators can and cannot do, so this
may be shooting in the dark.

But, how about write()s doing an operation "remainder of division" on
file pointer, and read()s simply starting with some point in a log
file (where writing itself would start).

This will bring in some strange behaviour (i.e. read()'s might
sometimes return latest data instead of earliest), but provided we
assume tail(1) is what's used to generally read the files, it should
be doable.  Or not?

Of course, feel free to completely ignore this since I'm missing a lot
of intricacies.

Cheers,
Danilo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]