Add signal detection for responder
This commit is contained in:
parent
4aa0614383
commit
cf25871587
1 changed files with 7 additions and 2 deletions
|
|
@ -42,7 +42,7 @@
|
|||
#include "responder.h"
|
||||
|
||||
#define IDENT_FMT "pyfcgi[%d]"
|
||||
#define MAX_REQS 50
|
||||
#define MAX_REQS 0
|
||||
|
||||
#define EARLY_ERR(err_str) write(2, err_str, strlen(err_str))
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
else if(!child)
|
||||
{
|
||||
responder_loop(py_entrypoint, MAX_REQS, 1, 30);
|
||||
responder_loop(py_entrypoint, MAX_REQS, 1, 10);
|
||||
exit((unsigned char)-1);
|
||||
}
|
||||
waitpid(child, &child_ret, 0);
|
||||
|
|
@ -97,6 +97,11 @@ int main(int argc, char **argv)
|
|||
{
|
||||
syslog(LOG_ERR, "Responder loop function exits with error code '%d'",
|
||||
WEXITSTATUS(child_ret));
|
||||
if(WIFSIGNALED(child_ret))
|
||||
{
|
||||
syslog(LOG_ERR, "Responder loop function terminated by sig '%d'",
|
||||
WTERMSIG(child_ret));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue