From 7572c77974896eb97c96d7c80b941feb1a970fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Sat, 28 Mar 2009 13:34:52 +0100 Subject: [PATCH] Fix mixed declarations and code --- fcgi-cgi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;