WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

Re: [Xen-devel] execve() in reboot.c ?

To: aq <aquynh@xxxxxxxxx>
Subject: Re: [Xen-devel] execve() in reboot.c ?
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: 2005年7月25日 19:29:09 +0100
Cc: Jeremy Katz <katzj@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: 2005年7月25日 18:27:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <9cde8bff0507251126303ec116@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <A95E2296287EAD4EB592B5DEEFCE0E9D282767@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <200507251903.59053.mark.williamson@xxxxxxxxxxxx> <9cde8bff0507251126303ec116@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.7.1
> actually what you suggested is in use now ;-). firstly, the code use
> daemonize() to become kernel thread, then execute userspace code
> (shutdown/poweroff/halt...). if that failed (for example in case there
> is no such userspace binary), sys_reboot is called.
Yeah, I just looked at the code and realised I was just spouting rubbish 
earlier :-)
> i dont see why we try to call userspace comand first, then fail thru
> to sys_reboot(). why just call sys_reboot()?
As Jeremy said, the reboot command does rather more than just call sys_reboot. 
The sys_reboot call means "really reboot now", without doing the nice things 
init does (unmounting filesystems, stopping processes politely, etc).
I think there must be another way of achieving this effect without exec-ing 
things, though.
Cheers,
Mark
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] execve() in reboot.c ? , Mark Williamson
Next by Date: Re: [Xen-devel] execve() in reboot.c ? , Anthony Liguori
Previous by Thread: Re: [Xen-devel] execve() in reboot.c ? , aq
Next by Thread: Re: [Xen-devel] execve() in reboot.c ? , Vincent Hanquez
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /