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

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



> 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


 


Rackspace

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