|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] execve() in reboot.c ?
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
|
|
|
|
|