Hi Daniel,
   I checked the latest version (0.9.6) and observed the following from the code.

  * So If a shutdown is issued from the within the container and
    only if that init process within the container terminates,
    the function "lxcPidGone()" in lxcController, takes care of exiting from the while loop.

  Please let me know, if my understanding is correct.

Thanks,
Alphonse

On Fri, Oct 7, 2011 at 5:06 AM, Daniel P. Berrange <berrange@redhat.com> wrote:
On Thu, Oct 06, 2011 at 02:06:19PM -0400, Alphonse Hansel Anthony wrote:
> Hi,
>
>    Is it possible to shutdown/restart a system LXC from within the
> container?
>
>    From what I have observed(Version - 0.8.4):
>    * The libvirt_lxc manager process, which listens on the /dev/pts for
> console connection loops
>       infinitely.

This is a flaw in that version of libvirt. If you upgrade to the
current libvirt it'll work much more reliably.


Daniel
--
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|