Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

DO NOT REPLY [Bug 10515] - cgi lock when writing to stderr

From: <bugzilla(at)apache.org>
Date: Wed Aug 21 2002 - 21:31:56 EDT


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10515>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10515

cgi lock when writing to stderr

  • Additional Comments From notgod@notgod.com 2002-08-22 01:31 ------- This is an apache-2.0 only issue. 1.3 does not exhibit this problem, and is seriously hampering development for us.

"Deferring your stderr logging until the entire body is read and the entire response is written." doesn't work for large scripts, sites, development environments, etc.

Also, this system will hang with as little as 4k of std_err action at leasr on RH 6.soemthing, apache 2.0.40... FreeBSD seems immune to this wackyness....

for example:
// Credit to: K.C. Wong
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <fcntl.h>

#define SIZE 4075

void out_err()
{

	char buffer[SIZE];
	int i = 0;

	for (i = 0; i < SIZE - 1; ++i)
		buffer[i] = 'a' + (char )(i % 26);

	buffer[SIZE - 1] = '\0';

//
fcntl(2, F_SETFL, fcntl(2, F_GETFL) | O_NONBLOCK);

	fprintf(stderr, "short test\n");
	fflush(stderr);

	fprintf(stderr, "test error=%s\n", buffer);
	fflush(stderr);

} // out_err()
Do you need help?X

int main(int argc, char ** argv)
{

	fprintf(stdout, "Context-Type: text/html\r\n");
	fprintf(stdout, "\r\n\r\n");
	out_err();
	fprintf(stdout, "\n");
	fprintf(stdout, "\n");
	fprintf(stdout, "

hello world

\n"); fprintf(stdout, "\n"); fprintf(stdout, "\n"); fflush(stdout); exit(0);

} // main()

To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org For additional commands, e-mail: bugs-help@httpd.apache.org Received on Thu Aug 22 01:31:22 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 16:43:50 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library