All of lore.kernel.org
 help / color / mirror / Atom feed
From: aq <aquynh@gmail.com>
To: Mark Williamson <mark.williamson@cl.cam.ac.uk>
Cc: Jeremy Katz <katzj@redhat.com>,
	xen-devel@lists.xensource.com,
	Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>
Subject: Re: execve() in reboot.c ?
Date: Tue, 26 Jul 2005 03:26:34 +0900	[thread overview]
Message-ID: <9cde8bff0507251126303ec116@mail.gmail.com> (raw)
In-Reply-To: <200507251903.59053.mark.williamson@cl.cam.ac.uk>

On 7/26/05, Mark Williamson <mark.williamson@cl.cam.ac.uk> 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

  parent reply	other threads:[~2005-07-25 18:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-25 11:00 execve() in reboot.c ? Ian Pratt
2005-07-25 17:41 ` aq
2005-07-25 17:47   ` Mark Williamson
2005-07-25 17:56     ` Jeremy Katz
2005-07-25 18:03       ` Mark Williamson
2005-07-25 18:13         ` Rik van Riel
2005-07-25 18:20           ` Vincent Hanquez
2005-07-25 18:30             ` Anthony Liguori
2005-07-25 19:18             ` Rik van Riel
2005-07-25 18:26           ` Mark Williamson
2005-07-25 18:26         ` aq [this message]
2005-07-25 18:29           ` Mark Williamson
2005-07-25 18:31           ` Vincent Hanquez
  -- strict thread matches above, loose matches on Subject: below --
2005-07-25 19:48 Ian Pratt
2005-07-25 20:18 ` Sean Dague
2005-07-25 20:31 ` Philip R Auld
2005-07-26 12:55   ` Gerd Knorr
2005-07-25 20:48 ` Mark Williamson
2005-07-25 20:46   ` Keir Fraser
2005-07-25 20:52   ` Rik van Riel
2005-07-25  8:53 aq

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cde8bff0507251126303ec116@mail.gmail.com \
    --to=aquynh@gmail.com \
    --cc=katzj@redhat.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=mark.williamson@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.