httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject A/UX patch received...
Date Mon, 31 Jul 1995 10:53:04 GMT
Eric Hagberg finally tracked down the problem he was having getting
*any* release of the current Apache code base (back to Shambhala)
running on A/UX.  It turns out that on this system, doing an fdopen()
of two FILE*s on the same file descriptor has seriously evil effects;
not only does output on the second kill the process, but if you're
running it under gdb, the debugger goes with it (meaning that he was
stuck tracking it down with printf() statements).

Two questsions ---

1) Has anyone heard of other stdio's with this problem?
2) Any objections to having this in the release?

rst



Patch follows:

Date: Mon, 31 Jul 1995 09:33:08 -0400 (EDT)
From: hagberg@aux.med.cornell.edu
To: rst@ai.mit.edu
Subject: Here are the aux patches...

diff -c -r ../../apache_0.8.4/src/conf.h ./conf.h
*** ../../apache_0.8.4/src/conf.h	Tue Jul 18 20:30:11 1995
--- ./conf.h	Mon Jul 31 09:02:38 1995
***************
*** 206,211 ****
--- 206,213 ----
  #undef NO_SETSID
  #define NEED_STRDUP
  #define _POSIX_SOURCE
+ #define JMP_BUF sigjmp_buf
+ #define FCNTL_SERIALIZED_ACCEPT
  
  #elif defined(SVR4)
  #define NO_KILLPG
diff -c -r ../../apache_0.8.4/src/http_main.c ./http_main.c
*** ../../apache_0.8.4/src/http_main.c	Thu Jul 27 07:59:38 1995
--- ./http_main.c	Mon Jul 31 09:04:21 1995
***************
*** 710,718 ****
  	
  	note_cleanups_for_fd (ptrans, csd);
  	update_child_status (child_num, SERVER_BUSY);
! 		
  	conn_in = fdopen (csd, "r");
  	conn_out = fdopen (csd, "w");
  	
  	current_conn = new_connection (ptrans, server_conf, conn_in, conn_out);
  
--- 710,721 ----
  	
  	note_cleanups_for_fd (ptrans, csd);
  	update_child_status (child_num, SERVER_BUSY);
! #ifdef AUX
! 	conn_in = conn_out = fdopen(csd, "r+");
! #else		
  	conn_in = fdopen (csd, "r");
  	conn_out = fdopen (csd, "w");
+ #endif
  	
  	current_conn = new_connection (ptrans, server_conf, conn_in, conn_out);
  
***************
*** 721,727 ****
  		rfc931((struct sockaddr_in *)&sa_client, &sa_server);
  	
  	r = read_request (current_conn);
! 		
  	if (r) process_request (r); /* else premature EOF --- ignore */
  		
  	if (bytes_in_pool (ptrans) > 80000) {
--- 724,732 ----
  		rfc931((struct sockaddr_in *)&sa_client, &sa_server);
  	
  	r = read_request (current_conn);
! #ifdef AUX
! 	rewind(r->connection->client);
! #endif		
  	if (r) process_request (r); /* else premature EOF --- ignore */
  		
  	if (bytes_in_pool (ptrans) > 80000) {


Mime
View raw message