httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Hanson" <andrew_g_han...@yahoo.com>
Subject Trouble with stdout/write on CGI exectable.
Date Fri, 12 May 2000 01:31:26 GMT
I've been playing around with writing an actual
exectuable cgi script in apache under linux.
 
Basically I output html through printf.  However
for some wacky reason, it doesn't like me to do
direct writes through stdout.
 
write craps out apache.
fwrite works just fine.

Basically by crapping out apache I mean that
it gives me the internal server error page.
 
ex.
 
int fd;
int len;
char fwrite_string[]="this will work\n";
char write_string[]="this wont work but should\n";
 
/* case 1 will work */
len=strlen(fwrite_string);
fwrite(fwrite_string,1,len,stdout);
 
/* case 2 won't work */
fd=fileno(stdout);
len=strlen(write_string);
write(fd,write_string,len);
 
Obviously both cases work just fine outside the
apache environment.  But it doesn't allow me to
use write, to talk to stdout.  Please help.
 
How can I work around this little wrinkle.
 
andrew_g_hanson@yahoo.com


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Mime
View raw message