Browse Source

Add a call to FCGI_Finish() in work() + comments

Yann Weber 4 years ago
parent
commit
59fa3b0dc4
3 changed files with 5 additions and 1 deletions
  1. 1
    0
      src/main.c
  2. 2
    1
      src/pyworker.c
  3. 2
    0
      src/pyworker.h

+ 1
- 0
src/main.c View File

@@ -164,5 +164,6 @@ if ($programname contains 'pyfcgi') then {
164 164
  * @subsection main_how_todo TODO
165 165
  * @todo Add another logging facility
166 166
  * @todo Add a configuration mecanism
167
+ * @todo Implement a watchdog (request too long, or too much memory ?)
167 168
  */
168 169
 

+ 2
- 1
src/pyworker.c View File

@@ -158,6 +158,7 @@ int work(char* py_entrypoint, int wrk_id, int semid, int max_reqs)
158 158
 			       wrk_id, count, piper_status);
159 159
 		}
160 160
 
161
+		FCGI_Finish();
161 162
 		//Increase sem showing the worker is idle
162 163
 		sop.sem_op = 1;
163 164
 		if(semop(semid, &sop, 1) < 0)
@@ -167,7 +168,7 @@ int work(char* py_entrypoint, int wrk_id, int semid, int max_reqs)
167 168
 			       "Worker[%d] error incrementing the semaphore : %s",
168 169
 			       wrk_id, strerror(err));
169 170
 		}
170
-
171
+		
171 172
 		syslog(LOG_DEBUG, "Worker[%d] request %d END [OK]",
172 173
 			wrk_id, count);
173 174
 	}

+ 2
- 0
src/pyworker.h View File

@@ -84,6 +84,8 @@ extern char **environ;
84 84
 
85 85
 typedef unsigned long int pywrkid_t;
86 86
 
87
+/**@todo TODO on all request (when updating env ?) update stdin so
88
+ * python will be able to read the request content */
87 89
 
88 90
 /**@brief the function that initialize the python worker
89 91
  * @ingroup worker_process

Loading…
Cancel
Save