mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-27 12:38:11 +00:00
iptables: remove the pid file after sending SIGTERM
Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
3c6ad76461
commit
12fbe114f6
@ -65,7 +65,8 @@ let delete ({ proto; dport; ip; port } as p) =
|
|||||||
let ic = open_in filename in
|
let ic = open_in filename in
|
||||||
let pid = int_of_string (input_line ic) in
|
let pid = int_of_string (input_line ic) in
|
||||||
logf "Sending SIGTERM to %d" pid;
|
logf "Sending SIGTERM to %d" pid;
|
||||||
Unix.kill pid Sys.sigterm
|
Unix.kill pid Sys.sigterm;
|
||||||
|
Unix.unlink filename
|
||||||
with e ->
|
with e ->
|
||||||
logf "delete: failed to remove proxy for %s: %s" filename (Printexc.to_string e);
|
logf "delete: failed to remove proxy for %s: %s" filename (Printexc.to_string e);
|
||||||
()
|
()
|
||||||
|
Loading…
Reference in New Issue
Block a user