[syslog-ng]Strang behaviour of syslog-ng (and my program)

Antai Ning aning@jetnet.ca
Mon, 15 Jul 2002 13:30:28 -0400


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">



RE: [syslog-ng]Strang behaviour of syslog-ng (and my =
program)



Hi Bazsi,

Sorry for sending something in HTML. My outlook = express is configured plain text as email format. I don't know why it = still goes out in HTML. Anyway, I resend it again.

---------------------------------------------------------------= -
Hi Bazsi,


Thanks for your reply first of all!
I've never used strace but I'll try it.
Yes, my program is using buffer and actually that's = the first thing I checked. But I'm pretty sure it's not there.

This is somewhat related to pipe openning. If I make = sure syslog-ng opens the pipe before my program, then everything is OK. = The code in my program is something like this:

        .
        .
initializing
        .
        .
while(1)
{
        open = pipe       #block here until syslog-ng = open the pipe
        while(1) =
        {
          &nb= sp;     select on the = pipe      #block here until the pipe is ready = for read or timeout (5 sec)
          &nb= sp;     next if timeout
          &nb= sp;     last if other side close the = pipe       #jump out the loop and try to = open pipe again
          &nb= sp;    
          &nb= sp;     read and process the = message    #normal
        }
}
          &nb= sp;    
Bazsi, you see anything wrong here?
Thanks,
Andy          = ;            = ;       



-----Original Message-----
From: Balazs Scheidler [mailto:bazsi@balabit.hu]
Sent: Monday, July 15, 2002 10:59 AM
To: syslog-ng@lists.balabit.hu
Subject: Re: [syslog-ng]Strang behaviour of = syslog-ng (and my program)


On Mon, Jul 15, 2002 at 10:32:08AM -0400, Antai Ning = wrote:
> Hi Gents,

> I'm posting the question again because I really = need an answer for it,

> Thanks a lot,
can you check whether strace shows anything insane? =
are you using buffering in your perl program? =
syslog-ng uses a read/write pipe, and writes = messages as soon as the pipe
becomes writable. if the pipe is not writable (as = indicated by poll),
messages are buffered in a fifo, whose size is = controlled by
log_fifo_size().
--
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C = 0944 9CFD 804E C82C 8EB1
_______________________________________________ =
syslog-ng maillist  -  = syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at
http://www.campin.net/syslog-ng/faq.html
_______________________________________________ = syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng Frequently asked questions at http://www.campin.net/syslog-ng/faq.html =