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
/var/log/squid/fifolog",
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
configured
http://groups.google.com/groups?selm=9o9960%241jmm%241%40FreeBSD.csie.NCTU.
edu.tw&output=gplain
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