aboutsummaryrefslogtreecommitdiff
path: root/fcgi-cgi.c
diff options
context:
space:
mode:
authorStefan Bühler <stbuehler@web.de>2009-03-28 13:34:52 +0100
committerStefan Bühler <stbuehler@web.de>2009-03-28 13:34:52 +0100
commit7572c77974896eb97c96d7c80b941feb1a970fe5 (patch)
treee283d5bdea30c7b31568d9598afbf1a063c91ff8 /fcgi-cgi.c
parent418a6844a7f666d3504841380ab607be8ab5d0f4 (diff)
downloadfcgi-cgi-7572c77974896eb97c96d7c80b941feb1a970fe5.tar.gz
fcgi-cgi-7572c77974896eb97c96d7c80b941feb1a970fe5.zip
Fix mixed declarations and code
Diffstat (limited to 'fcgi-cgi.c')
-rw-r--r--fcgi-cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fcgi-cgi.c b/fcgi-cgi.c
index 8f7a5d1..52824a6 100644
--- a/fcgi-cgi.c
+++ b/fcgi-cgi.c
@@ -338,6 +338,7 @@ static void fcgi_cgi_child_error(fcgi_cgi_child *cld) {
static void fcgi_cgi_child_start(fcgi_cgi_child *cld, const gchar *path) {
int pipes_to[2] = {-1, -1}, pipes_from[2] = {-1, -1}, pipes_err[2] = {-1, -1};
+ pid_t pid;
if (-1 == pipe(pipes_to)) {
ERROR("couldn't create pipe: %s\n", g_strerror(errno));
@@ -354,7 +355,7 @@ static void fcgi_cgi_child_start(fcgi_cgi_child *cld, const gchar *path) {
goto error;
}
- pid_t pid = fork();
+ pid = fork();
switch (pid) {
case 0: {
GPtrArray *enva = cld->fcon->environ;