mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
remove zombie proc_st when its state has been 'stolen'
This commit is contained in:
+6
-2
@@ -286,7 +286,7 @@ void remove_proc(main_server_st * s, struct proc_st *proc, unsigned k)
|
|||||||
list_del(&proc->list);
|
list_del(&proc->list);
|
||||||
s->active_clients--;
|
s->active_clients--;
|
||||||
|
|
||||||
if (k && proc->pid != -1)
|
if (k && proc->pid != -1 && proc->pid != 0)
|
||||||
kill(proc->pid, SIGTERM);
|
kill(proc->pid, SIGTERM);
|
||||||
|
|
||||||
remove_from_script_list(s, proc);
|
remove_from_script_list(s, proc);
|
||||||
@@ -686,7 +686,11 @@ int handle_commands(main_server_st * s, struct proc_st *proc)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
/* handle_auth_reinit() has succeeded so the current proc
|
||||||
|
* is in zombie state and unused. Terminate it.
|
||||||
|
*/
|
||||||
|
ret = ERR_WORKER_TERMINATED;
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
case AUTH_REQ:
|
case AUTH_REQ:
|
||||||
if (proc->status != PS_AUTH_INIT) {
|
if (proc->status != PS_AUTH_INIT) {
|
||||||
|
|||||||
Reference in New Issue
Block a user