In the last episode (Dec 10), George Georgalis said:
> On Sun, Dec 08, 2002 at 11:45:22PM -0600, Dan Nelson wrote:
> > #! /bin/sh
> > printf "Content-type: text/plain\r\n\r\n"
> > tail -f /var/log/messages
> >
>
> Unfortunatly if you try that your webserver will quickly fail because
> the connection never closes. If your customers can create cgi scripts
> they can bring down your server too.
>
> How fast depends on httpd.conf MaxSpareServers, and how quickly you
> hit reload.
The connection does close, but it looks like tail does not correctly
exit:
kevent(0x4,0x0,0x0,0xbfbff410,0x1,0x0) = 1 (0x1)
read(0x3,0x804d000,0x2000) = 90 (0x5a)
read(0x3,0x804d000,0x2000) = 0 (0x0)
write(1,0x804f000,90) ERR#32 'Broken pipe'
kevent(0x4,0x0,0x0,0xbfbff410,0x1,0x0) = 1 (0x1)
read(0x3,0x804d000,0x2000) = 85 (0x55)
read(0x3,0x804d000,0x2000) = 0 (0x0)
write(1,0x804f000,85) ERR#32 'Broken pipe'
kevent(0x4,0x0,0x0,0xbfbff410,0x1,0x0) = 1 (0x1)
read(0x3,0x804d000,0x2000) = 34 (0x22)
read(0x3,0x804d000,0x2000) = 0 (0x0)
write(1,0x804f000,34) ERR#32 'Broken pipe'
Not sure why though. The error-checking code in tail looks fine.
--
Dan Nelson
[EMAIL PROTECTED]
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message