access logging to a Named Pipe

From: Michael Smirnov <>
Date: Fri, 19 Apr 2002 13:44:37 +0400

I'm trying to log to a FIFO named pipe on FreeBSD 4.4-R, squid-2.5.PRE5.
I did "mkfifo /var/log/squid/fifolog", "chown squid:squid
configured Squid "cache_access_log /var/log/squid/fifolog"

I ran a small SUID perl script with owner "squid" on a virtual terminal,
and tried to start Squid. I noticed in cache.log
2002/04/15 19:50:13| logfileOpen: /var/log/squid/fifolog: (6) Device not

The author of that old message was right -
"So the problem appears to be because squid is attempting to open the file
using non blocking io (the O_NONBLOCK flag)."
Named pipe-logging worked after
I commented out just 1 line in disk.c:

file_open(const char *path, int mode)
    int fd;
    if (mode & O_WRONLY)
        mode |= O_APPEND;
// mode |= SQUID_NONBLOCK;
    errno = 0;

I don't know, which bad effects it can have.
Can anyone of Squid developers help me to make a good patch
to this logging?
Received on Fri Apr 19 2002 - 04:20:13 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:15:13 MST