]>
Commit | Line | Data |
---|---|---|
bc240951 ER |
1 | --- ./src/cgi.c~ 2005-02-08 00:08:01.000000000 +0200 |
2 | +++ ./src/cgi.c 2005-02-08 00:13:02.000000000 +0200 | |
3 | @@ -686,16 +686,18 @@ | |
4 | ||
5 | int to_cgi_fds[2]; | |
6 | int from_cgi_fds[2]; | |
7 | - struct stat st; | |
8 | - | |
9 | + | |
10 | #ifndef __WIN32 | |
11 | + struct stat st; | |
12 | ||
13 | - /* stat the exec file */ | |
14 | - if (-1 == (stat(cgi_handler->ptr, &st))) { | |
15 | - log_error_write(srv, __FILE__, __LINE__, "sbss", | |
16 | - "stat for cgi-handler", cgi_handler, | |
17 | - "failed:", strerror(errno)); | |
18 | - return -1; | |
19 | + if (cgi_handler->used > 1) { | |
20 | + /* stat the exec file */ | |
21 | + if (-1 == (stat(cgi_handler->ptr, &st))) { | |
22 | + log_error_write(srv, __FILE__, __LINE__, "sbss", | |
23 | + "stat for cgi-handler", cgi_handler, | |
24 | + "failed:", strerror(errno)); | |
25 | + return -1; | |
26 | + } | |
27 | } | |
28 | ||
29 | if (pipe(to_cgi_fds)) { |