[RFC PATCH 26/35] Add Xen subarch reboot support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

  -- Keir


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux