lkml.org 
[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 26/35] Add Xen subarch reboot support
From
Date
On Wed, 2006-03-22 at 10:22 +0000, Keir Fraser wrote:
> On 22 Mar 2006, at 08:40, Arjan van de Ven wrote:
>
> >> +static int shutdown_process(void *__unused)
> >> +{
> >> + static char *envp[] = { "HOME=/", "TERM=linux",
> >> + "PATH=/sbin:/usr/sbin:/bin:/usr/bin", NULL };
> >> + static char *restart_argv[] = { "/sbin/reboot", NULL };
> >> + static char *poweroff_argv[] = { "/sbin/poweroff", NULL };
> >
> > how is this function different from the generic one? If not, why aren't
> > you using the generic one?
>
> The intent is to allow remote management tools to trigger a clean
> shutdown of the virtual machine. That requires us to notify to
> userspace, and this function does that by exec'ing one of the standard
> userspace programs. Given the trigger is received by the kernel in the
> first instance I don't know a better way of doing this. And if this is
> the best way, I don't think there is generic code in the kernel which
> does the same thing.


well this isn't really different from the normal ctrl-alt-delete right?
I would strongly suggest to follow the normal ctrl-alt-del path.. that
follows the normal convention sysadmins are used to.
It's not "/sbin/poweroff" fwiw... at least not hardcoded. Following the
normal ctrl-alt-del codepath gets all the policy out of this kind of
thing as well..


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-22 11:44    [W:0.074 / U:0.296 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site