- Timestamp:
- Jun 11, 2016, 11:48:27 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/kernel/configuration.rst
r752 r772 158 158 ............................... 159 159 160 The ``lenv`` can be used to store runtime informations automatically161 set by ZOO-Kernel before and during the execution of a WPS service, 162 with the followingparameters:160 The ``lenv`` section is used by the ZOO-Kernel to store runtime informations 161 before the execution of a WPS service, it contains the following 162 parameters: 163 163 164 164 * ``sid`` (r): The WPS Service unique identifier, … … 169 169 * ``cookie`` (rw): The cookie to be returned to the client (for 170 170 example for authentication purpose). 171 * ``file.pid`` (r): The file used by the ZOO-Kernel to store process identifier. 172 * ``file.sid`` (r): The file used by the ZOO-Kernel to store service identifier. 173 * ``file.responseInit`` (r): The file used by the ZOO-Kernel to store 174 the initial (then final) WPS response. 175 * ``file.responseFinal`` (r): The file used by the ZOO-Kernel to 176 temporary store the final WPS response. 177 178 renv section 179 ............................... 180 181 The ``renv`` section is automatically created by the ZOO-Kernel before 182 the execution of a WPS service, it contains all the environment 183 variables available at runtime (so including the header fields in case 184 it is used through http, refer to [https://tools.ietf.org/html/rfc3875 185 rfc3875] for more details). 186 171 187 172 188 senv section -
trunk/zoo-project/zoo-kernel/zoo_service_loader.c
r767 r772 102 102 #include <time.h> 103 103 #include <stdarg.h> 104 105 #ifndef WIN32 106 extern char **environ; 107 #endif 104 108 105 109 #ifdef WIN32 … … 1974 1978 dumpMap (request_inputs); 1975 1979 #endif 1980 1981 int ei = 1; 1982 char *s = 1983 #ifdef WIN32 1984 GetEnvironmentStrings(); 1985 #else 1986 *environ; 1987 #endif 1988 _tmpMaps = (maps *) malloc (MAPS_SIZE); 1989 _tmpMaps->name = zStrdup ("renv"); 1990 _tmpMaps->content = NULL; 1991 _tmpMaps->next = NULL; 1992 for (; s; ei++) { 1993 char* tmpName=zStrdup(s); 1994 char* tmpValue=strstr(s,"=")+1; 1995 tmpName[strlen(tmpName)-strlen(tmpValue)-1]=0; 1996 if(_tmpMaps->content == NULL) 1997 _tmpMaps->content = createMap (tmpName,tmpValue); 1998 else 1999 addToMap (_tmpMaps->content,tmpName,tmpValue); 2000 free(tmpName); 2001 s = *(environ+ei); 2002 } 2003 addMapsToMaps (&m, _tmpMaps); 2004 freeMaps (&_tmpMaps); 2005 free (_tmpMaps); 2006 1976 2007 #ifdef WIN32 1977 2008 char *cgiSidL = NULL; … … 2091 2122 strlen (usid->value) + 7) * sizeof (char)); 2092 2123 sprintf (fbkpid, "%s/%s.pid", r_inputs->value, usid->value); 2124 setMapInMaps (m, "lenv", "file.pid", fbkpid); 2093 2125 2094 2126 f0 = freopen (fbkpid, "w+",stdout); … … 2102 2134 strlen (usid->value) + 7) * sizeof (char)); 2103 2135 sprintf (fbkp, "%s/%s.sid", r_inputs->value, usid->value); 2136 setMapInMaps (m, "lenv", "file.sid", fbkp); 2104 2137 FILE* f2 = freopen (fbkp, "w+",stdout); 2105 2138 printf("%s",tmpm->value); … … 2113 2146 sprintf (fbkp, "%s/%s_%s.xml", r_inputs->value, r_inputs1->value, 2114 2147 usid->value); 2148 setMapInMaps (m, "lenv", "file.responseInit", fbkp); 2115 2149 flog = 2116 2150 (char *) … … 2119 2153 sprintf (flog, "%s/%s_%s_error.log", r_inputs->value, 2120 2154 r_inputs1->value, usid->value); 2155 setMapInMaps (m, "lenv", "file.log", flog); 2121 2156 #ifdef DEBUG 2122 2157 fprintf (stderr, "RUN IN BACKGROUND MODE \n"); … … 2160 2195 sprintf (fbkp1, "%s/%s_final_%s.xml", r_inputs->value, 2161 2196 r_inputs1->value, usid->value); 2197 setMapInMaps (m, "lenv", "file.responseFinal", fbkp1); 2162 2198 2163 2199 f1 = freopen (fbkp1, "w+", stdout);
Note: See TracChangeset
for help on using the changeset viewer.