--------------------- PatchSet 8499 Date: 2006/08/16 03:00:14 Author: adri Branch: s26_logfile_daemon Tag: (none) Log: Buffer stdin! Members: src/logfile-daemon.c:1.1.2.2->1.1.2.3 Index: squid/src/logfile-daemon.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/logfile-daemon.c,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid/src/logfile-daemon.c 8 Aug 2006 07:43:59 -0000 1.1.2.2 +++ squid/src/logfile-daemon.c 16 Aug 2006 03:00:14 -0000 1.1.2.3 @@ -62,6 +62,7 @@ char buf[LOGFILE_BUF_LEN]; int rotate_count = 10; int do_buffer = 0; + char readbuf[BUFSIZ]; /* Try flushing to disk every second */ signal(SIGALRM, signal_alarm); @@ -78,7 +79,7 @@ exit(1); } - setbuf(stdin, NULL); + setbuf(stdin, readbuf); setbuf(stdout, NULL); close(2); t = open("/dev/null", O_RDWR);