mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
remove socket and pid files prior to waiting for kill.
This commit is contained in:
+3
-2
@@ -722,6 +722,9 @@ unsigned total = 10;
|
|||||||
if (terminate != 0) {
|
if (terminate != 0) {
|
||||||
mslog(s, NULL, LOG_DEBUG, "termination request received; waiting for children to die");
|
mslog(s, NULL, LOG_DEBUG, "termination request received; waiting for children to die");
|
||||||
kill_children(s);
|
kill_children(s);
|
||||||
|
remove(s->socket_file);
|
||||||
|
remove_pid_file();
|
||||||
|
|
||||||
while (waitpid(-1, NULL, WNOHANG) == 0) {
|
while (waitpid(-1, NULL, WNOHANG) == 0) {
|
||||||
if (total == 0) {
|
if (total == 0) {
|
||||||
mslog(s, NULL, LOG_DEBUG, "not everyone died; forcing kill");
|
mslog(s, NULL, LOG_DEBUG, "not everyone died; forcing kill");
|
||||||
@@ -730,8 +733,6 @@ unsigned total = 10;
|
|||||||
ms_sleep(500);
|
ms_sleep(500);
|
||||||
total--;
|
total--;
|
||||||
}
|
}
|
||||||
remove(s->socket_file);
|
|
||||||
remove_pid_file();
|
|
||||||
|
|
||||||
/* try to clean-up everything allocated to ease checks
|
/* try to clean-up everything allocated to ease checks
|
||||||
* for memory leaks.
|
* for memory leaks.
|
||||||
|
|||||||
Reference in New Issue
Block a user