CVS diff for cgi.c between 1.3 and 1.1:

Revision 1.1 Revision 1.3
Line 6 Line 6
void create_common_env() 

/* not yet */ 
void create_common_env() 

/* not yet */ 
    return (void)NULL; 
    //return (void)NULL; 


int do_job(msg* req) 
int do_job(msg * req) 
{
{
  FILE* tf = tmpfile();
  int child_pid;
    FILE *tf = tmpfile();
    int pipes[2]; 
  int pipes[2];
 

            

            
  if (NULL==tmpfile) return -1; 
    if (NULL == tf)
 
	return -1;

            

            
  pipe(pipes); 
    pipe(pipes); 

            

            
  if ( -1 == dup2(pipes[1], STDOUT_FILENO) )
  {
    perror("dup2 - pipes");
    close(pipes[0]);
    close(pipes[1]);
    exit(1);
    if (-1 == dup2(pipes[1], STDOUT_FILENO)) {
	perror("dup2 - pipes");
	close(pipes[0]);
	close(pipes[1]);
	exit(1);
    } 
  }
 
/* 
if ( -1 == fcntl(pipes[1], F_SETFL, 0) ) 
/* 
if ( -1 == fcntl(pipes[1], F_SETFL, 0) ) 
Line 44 Line 43

*/ 
 

*/ 
 
  if (req->is_cgi)
    if (req->is_cgi) { 
  {
 
	// execve 
// implement later.... hahaha
	// execve 
// implement later.... hahaha

            

            
  return 0; 
    return 0; 


int
int tmp_cgi(msg * req) 
tmp_cgi(msg* req)
 
{
{
   return 0;
   // fork off here later
   // for now, just call
   do_job( req );
   return 0; 
    return 0;
    // fork off here later
    // for now, just call
    do_job(req);
    return 0; 




Legend
Lines deleted from 1.3  
Lines Modified
  Lines added in revision 1.1