mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomas Szepe <szepe@pinerecords.com>
To: "Richard B. Johnson" <root@chaos.analogic.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: how to restart userland?
Date: Mon, 3 Nov 2003 21:41:18 +0100	[thread overview]
Message-ID: <20031103204118.GJ16820@louise.pinerecords.com> (raw)
In-Reply-To: <Pine.LNX.4.53.0311031519050.2654@chaos>

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>

  reply	other threads:[~2003-11-03 20:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-03 19:39 Tomas Szepe
2003-11-03 20:03 ` Valdis.Kletnieks
2003-11-03 20:12   ` Tomas Szepe
2003-11-04 10:05     ` Helge Hafting
2003-11-04 15:47       ` Thierry Vignaud
2003-11-03 20:21   ` Måns Rullgård
2003-11-03 20:31     ` Valdis.Kletnieks
2003-11-03 20:32 ` Richard B. Johnson
2003-11-03 20:41   ` Tomas Szepe [this message]
2003-11-03 21:00     ` Francois Romieu
2003-11-03 21:03       ` Francois Romieu
2003-11-03 21:12         ` Tomas Szepe
2003-11-03 23:32   ` Miquel van Smoorenburg

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=20031103204118.GJ16820@louise.pinerecords.com \
    --to=szepe@pinerecords.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®