]>
Commit | Line | Data |
---|---|---|
a5e06814 ER |
1 | from http://trac.lighttpd.net/trac/changeset/35 |
2 | ||
3 | --- trunk/src/mod_cgi.c (revision 34) | |
4 | +++ trunk/src/mod_cgi.c (revision 35) | |
5 | @@ -690,12 +690,14 @@ | |
6 | ||
7 | #ifndef __WIN32 | |
8 | ||
9 | - /* stat the exec file */ | |
10 | - if (-1 == (stat(cgi_handler->ptr, &st))) { | |
11 | - log_error_write(srv, __FILE__, __LINE__, "sbss", | |
12 | - "stat for cgi-handler", cgi_handler, | |
13 | - "failed:", strerror(errno)); | |
14 | - return -1; | |
15 | + if (cgi_handler->used > 1) { | |
16 | + /* stat the exec file */ | |
17 | + if (-1 == (stat(cgi_handler->ptr, &st))) { | |
18 | + log_error_write(srv, __FILE__, __LINE__, "sbss", | |
19 | + "stat for cgi-handler", cgi_handler, | |
20 | + "failed:", strerror(errno)); | |
21 | + return -1; | |
22 | + } | |
23 | } | |
24 | ||
25 | if (pipe(to_cgi_fds)) { |