| Revision 1.1 | Revision 1.2 |
|---|---|
| Line 9 | Line 9 |
return (void)NULL; |
return (void)NULL; |
int do_job(msg* req) |
int do_job(msg * req) |
{
|
{
|
FILE* tf = tmpfile(); int child_pid; int pipes[2]; |
FILE *tf = tmpfile();
int child_pid;
int pipes[2];
|
if (NULL==tmpfile) return -1; |
if (NULL == tmpfile) |
|
|
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);
}
|
} |
|
/* |
/* |
| Line 44 | Line 44 |
} |
} |
if (req->is_cgi) |
if (req->is_cgi) {
|
{
|
|
// execve |
// execve |
} |
} |
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.2 | |
| Lines Modified | |
| Lines added in revision 1.1 | |