syslogd can write to "unterminated" fifo

From: Artur R. Czechowski (arturcz@hell.pl)
Date: Tue Jul 29 2003 - 22:03:48 CEST


Hello

In BTS I have found the bug http://bugs.debian.org/45245 and I would like
to provide additional info.

1. /dev/xconsole case - man 5 syslog.conf says, that syslogd has support for
logging output to named fifos. Just prepend name of fifo by a pipe symbol
``|''. Read referenced manual, section ACTIONS, subsection Named Pipes.

2. /dev/tty* case - from program's view writing to /dev/tty* works the same
way as writing to any FIFO. If output to terminal is locked (with ^S or
similar) there is a small buffer, where data are stored. When buffer is
filled, writing is stopped (due to blocking mode of writing). If you are afraid
of locking syslogd (see also 4.) just use |/dev/tty* in syslog instead of
/dev/tty*.

3. due to the above, I think that patch proposed by Adreas is unneeded, because
there is a possibility to workaround.

4. there is a danger that stopped syslog would make all application writing to it
stopped too - unix socket used to write data to syslog is also FIFO
interface, writing to it is also in blocking mode.

As a conclusion of the above I recommend to add to man 5 syslog.conf, section
ACTIONS, subsection Terminal and Console following note:

-----8<-[cut here]----------8<-[cut here]----------8<-[cut here]-----
If you stop output to terminal/console (using ^S ot ScrollLock) for
long enough you cause to stop syslog because of full internal
buffer. After some time it causes application writing
to syslog to stop because of its internal buffer being full. So, do NOT do that.
If you like to use ^S and you want to avoid this behavior, please consider
Terminal as Named Pipe and in syslog put a line like:
        *.* |/dev/tty12
As a result, all data written after internal buffer is filled, will be lost.
You have been warned.
-----8<-[cut here]----------8<-[cut here]----------8<-[cut here]-----

and close this bug in BTS.

Regards
        Artur

-- 
19 wrzesnia 2001 o godzinie 20.30 problem z internetem zostal naprawiony.
                         /CST POLPAK TP S.A. na grupie pl.internet.komunikaty/




This archive was generated by hypermail 2.1.7 : Tue Jul 29 2003 - 22:17:17 CEST