--------------------- PatchSet 210 Date: 2002/11/28 10:53:20 Author: rbcollins Branch: external_logger Tag: (none) Log: don't read from the preserved logfd Members: src/logfile.cc:1.1.14.2->1.1.14.3 Index: squid3/src/logfile.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/logfile.cc,v retrieving revision 1.1.14.2 retrieving revision 1.1.14.3 diff -u -r1.1.14.2 -r1.1.14.3 --- squid3/src/logfile.cc 28 Nov 2002 09:47:31 -0000 1.1.14.2 +++ squid3/src/logfile.cc 28 Nov 2002 10:53:20 -0000 1.1.14.3 @@ -1,5 +1,5 @@ /* - * $Id: logfile.cc,v 1.1.14.2 2002/11/28 09:47:31 rbcollins Exp $ + * $Id: logfile.cc,v 1.1.14.3 2002/11/28 10:53:20 rbcollins Exp $ * * DEBUG: section 50 Log file handling * AUTHOR: Duane Wessels @@ -38,6 +38,9 @@ static void logfileWriteWrapper(Logfile * lf, const void *buf, size_t len); static EVH logfileHelperQuit; + +static DEFER logFDDefer; + Logfile * logfileOpen(const char *path, size_t bufsz, int fatal_flag) { @@ -88,11 +91,18 @@ lf->pid = x; lf->logfd = lf->ipccomm.pwfd; commUnsetNonBlocking(lf->logfd); + commSetDefer(lf->logfd, logFDDefer, NULL); add_ipc_quit_handler(x, logfileHelperQuit, lf); debug (50,2)("Successfully spawned log helper with squid log fd %d\n", lf->logfd); return lf; } +int +logFDDefer(int unused, void *alsounused) +{ + return 1; +} + void logfileClose(Logfile * lf) {