Έλεγχος για rotation log αρχείου

V13 v13 at v13.gr
Wed Sep 16 19:59:43 EEST 2009


On Wednesday 16 September 2009, Giorgos Keramidas wrote:
> On Wed, 16 Sep 2009 14:34:44 +0300, George Notaras <gnot at g-loaded.eu> wrote:
> > Christos Ricudis wrote:
> >> Sthn kalyterh periptwsh, mporeis na peis ston log writer "grapse ayto to
> >> log sto shmeio A (arxeio) kai sto shmeio B (pipe). Esy to diabazeis apo
> >> to pipe.
> >
> > Αν δεν διαβάζει κανείς το pipe, ποια είναι η κατάληξη όσων γράφονται
> > εκεί? Γίνονται discard ή παραμένουν σε κάποιο queue;
> 
> Μετά λυπήσου τον καημένο το writer.  Τα pipes έχουν ένα περιορισμένο
> buffer size και μετά κάθε write attempt είναι blocking.

Exei workaround:

if ( *p == '|' ) {
	f->f_file = open(++p, O_RDWR|O_NONBLOCK|O_NOCTTY);
	f->f_type = F_PIPE;
}

... kai kapo alloy ...

/* If a named pipe is full, just ignore it for now */
if (f->f_type == F_PIPE && e == EAGAIN)
	break;

(apo to sysklogd 1.5 toy debian/testing)

<<V13>>


More information about the Linux-greek-users mailing list