[pve-devel] [PATCH container] add vm_stop helper

Dietmar Maurer dietmar at proxmox.com
Fri Oct 13 16:12:03 CEST 2017


> +# Helper to stop a container completely and make sure it has stopped
> completely.
> +# This is necessary because we want the post-stop hook to have completed its
> +# unmount-all step, but post-stop happens after lxc puts the container into
> the
> +# STOPPED state.
> +sub vm_stop {
> +    my ($vmid, $kill, $shutdown_timeout, $exit_timeout) = @_;
> +
> +    # Open the container's command socket.
> +    my $path = "\0/var/lib/lxc/$vmid/command";

Why do we need this "\0" exactly?



More information about the pve-devel mailing list