[Lxc-users] lxc unix socket, what is it for?

Daniel Lezcano daniel.lezcano at free.fr
Wed May 18 22:48:49 UTC 2011


On 05/18/2011 06:17 PM, arkaitzj at gmail.com wrote:
> Yeah, it is an abstract socket, but what is it for?

This af_unix socket is used for:

  (1) sending command to lxc-start (the supervisor of the container's init)

    - 'stop': used by lxc-stop to kill the container, the lxc-stop exits 
when the af_unix connection is closed, so we have the guarantee the 
'stop' will return after the container dies, so we can call lxc-start 
right after lxc-stop.

    -  'pid' : get the real pid of the init process

    - 'state' : get the state of the container which is monitored by 
lxc-start

(2) get a tty file descriptor using the fd passing af_unix mechanism, so 
lxc-console can work.




More information about the lxc-users mailing list