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 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] execve() in reboot.c ?
From: aq <aquynh@xxxxxxxxx>
Date: Tue, 26 Jul 2005 03:26:34 +0900
Cc: Jeremy Katz <katzj@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Mon, 25 Jul 2005 18:25:08 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VbVllPabu6zsfnOhhTF1Fc/3NP/jdYaW/Q2LES1DSc5gwWxL5cYzVvfxTTejFkQBmqtM6qSg7tGDysrj5DRyAlSit8F42ItdT6b0jTvQ2wI5AffGUd8QDHss9b8wqEFL1BvJoY6zmzmamjkDPBADX54426fgyj5SMY3yFY099ps=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200507251903.59053.mark.williamson@xxxxxxxxxxxx>
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> <200507251847.56337.mark.williamson@xxxxxxxxxxxx> <1122314192.2608.20.camel@xxxxxxxxxxxxxx> <200507251903.59053.mark.williamson@xxxxxxxxxxxx>
Reply-to: aq <aquynh@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 7/26/05, Mark Williamson <mark.williamson@xxxxxxxxxxxx> wrote:
> > > Can't we just fire off a kernel thread to call sys_reboot and friends
> > > directly?  It seems unfortunate to have to rely on userspace
> > > applications, having gone to the trouble of handling the cmsg in the
> > > kernel.
> >
> > That doesn't do a graceful shutdown of running processes, does it?
> 
> Hmmmm, I suppose not.  Ah well, I think I'll withdraw my previous statement as
> I can't think of another way to do this right now :-)
> 

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.

i dont see why we try to call userspace comand first, then fail thru
to sys_reboot(). why just call sys_reboot()?


regards,
aq

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel