[lxc-devel] detecting reboot/halt...

Mikhail Gusarov dottedmag at dottedmag.net
Thu Apr 8 08:44:17 UTC 2010


Twas brillig at 10:38:05 08.04.2010 UTC+02 when dlezcano at fr.ibm.com did
gyre and gimble:

 DL> Yep, I did a quick hack in sys_reboot sending a SIGPWR to the
 DL> parent of the pid namespace when this one is not the init_pid_ns,
 DL> but I didn't had time to propose/send an acceptable version and
 DL> argue for it on lkml@/containers at .  Furthermore, before sending a
 DL> patch to the kernel, we have to be sure this problem can't be
 DL> solved from userspace first.

It should be possible to preload library that intercepts sys_reboot in
init. Though it will work only for dynamically-linked init.

Proper solution is patching the kernel, unless there is a way to
reliably intercept syscalls somehow.

-- 
  http://fossarchy.blogspot.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20100408/41f258e2/attachment.pgp>


More information about the lxc-devel mailing list