Messages in this thread | | | Date | Mon, 3 Nov 2003 21:41:18 +0100 | From | Tomas Szepe <> | Subject | Re: how to restart userland? |
| |
On Nov-03 2003, Mon, 15:32 -0500 Richard B. Johnson <root@chaos.analogic.com> wrote:
> char *argv[3]; > argv[0] ="/sbin/init"; > argv[1] ="auto"; > argv[2] = NULL; > execve(argv[0], argv, __environ); > > That will overlay and restart init from scratch.
OK, that sounds like a plan. There's one problem, though -- I really need to do this in a single step (i.e. I won't have console access to issue any commands after all processes have been killed off and all the world's got is a root shell), so the script mustn't get killed while the system is coming down.
Thanks for help, -- Tomas Szepe <szepe@pinerecords.com> - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |