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

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Oct 16 09:02:59 CEST 2017


On Fri, Oct 13, 2017 at 04:12:03PM +0200, Dietmar Maurer wrote:
> > +# 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?

It's an abstract socket.



More information about the pve-devel mailing list