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

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


  • To: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.