lkml.org 
[lkml]   [2003]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.109 / U:2.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site