tech-userlevel archive

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

Re: Add support for fifo files (mkfifo(2)) to syslogd(8)

In article <21115.52430.973960.737461%gargle.gargle.HOWL@localhost>,
Anthony Mallet  <> wrote:
>I would find it useful if syslogd(8) would handle writes to FIFO files in
>addition to existing support for regular files.
>I found some old discussion about this (see
>and follow-ups), but this did not seem to reach a consensus
>I just spent a few minutes adding support for FIFO to syslogd(8) with a
>slightly different approach than in the thread above. AFAIK I did not introduce
>any compatibility issue. My patch just tests if a file specified in a
>syslog.conf is a FIFO or a regular file, and acts accordingly.
>The patch is small enough so that I attach it below.
>Would it be acceptable for integration into NetBSD?
>PS: The main reason for my request is not really fundamental, but I recently
>figured out that since Linux kernel 2.6, Linux has broken^Wrestricted
>/dev/console and the use of TIOCCONS to root. (and thus broken xconsole, xterm
>-C etc.). I have a homemade ~20 lines script written in TCL that can watch
>console messages on Linux by polling a FIFO file in /dev/xconsole (note the
>'x'), which is what Linux found to unbreak xconsole and the like.
>Watching /dev/console (the real one) from TCL on NetBSD is a bit hard, since
>this requires some C code to send the proper TIOCCONS ioctl(2), and well
>... this defeats the purpose of using some scripting language. All in all, I
>finally find the use of a FIFO not that bad.

Fine, but are you sure you wnt to drop messages with EAGAIN? What happens
if the pipe gets full?


Home | Main Index | Thread Index | Old Index