Keep FastCGI available during restarts
This commit is contained in:
@@ -1549,6 +1549,12 @@ pid_t task(String key, std::function<void()> exec_after_spawn, u64 timeout)
|
||||
{
|
||||
close_locked_file(lock_fd);
|
||||
my_pid = getpid();
|
||||
// The FastCGI worker handles termination to drain accepted requests.
|
||||
// Generic task children do not run that drain loop, so inheriting those
|
||||
// handlers would turn task_kill(SIGTERM) into a no-op.
|
||||
signal(SIGTERM, SIG_DFL);
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGHUP, SIG_DFL);
|
||||
signal(SIGALRM, SIG_DFL);
|
||||
if(timeout > 0)
|
||||
alarm(timeout);
|
||||
|
||||
Reference in New Issue
Block a user