diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-09-18 15:59:31 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-11-21 05:48:19 +0100 |
commit | 8d16db0cc28b2d911aee918d5c3582ad29ddfeed (patch) | |
tree | 4d957d790ce8a0470ad2dee353d3718a614b7e7d /proc/main.c | |
parent | c99cb9e4ab1bd2683759f35a6878a685bf5e8dd7 (diff) | |
download | hurd-8d16db0cc28b2d911aee918d5c3582ad29ddfeed.tar.gz hurd-8d16db0cc28b2d911aee918d5c3582ad29ddfeed.tar.bz2 hurd-8d16db0cc28b2d911aee918d5c3582ad29ddfeed.zip |
Add proc_set_init_task, make runsystem pid 1
* hurd/process.defs (proc_set_init_task): New procedure.
* hurd/process_reply.defs (proc_set_init_task): Likewise.
* hurd/process_request.defs (proc_set_init_task): Likewise.
* include/pids.h: Add HURD_PID_INIT as 1, adjust others accordingly.
* init/init.c (start_child): Register the child task.
* proc/proc.h (init_proc): New variable.
(create_startup_proc): Rename to create_init_proc.
* proc/main.c (main): Create placeholder proc object for pid 1.
* proc/mgt.c: Use init_proc instead of startup_proc, as the former is
the new root of the process tree.
(create_startup_proc): Rename to create_init_proc.
(S_proc_set_init_task): New function.
* doc/hurd.texi (Server Bootstrap): Update accordingly.
* procfs/main.c: Do not hard-code kernel pid, use pids.h instead.
Diffstat (limited to 'proc/main.c')
-rw-r--r-- | proc/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/proc/main.c b/proc/main.c index 73742edd..f1f4e1b0 100644 --- a/proc/main.c +++ b/proc/main.c @@ -1,5 +1,5 @@ /* Initialization of the proc server - Copyright (C) 1993,94,95,96,97,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1993,94,95,96,97,99,2000,01,13 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -88,7 +88,12 @@ main (int argc, char **argv, char **envp) generic_port = ports_get_right (genport); /* Create the initial proc object for init (PID 1). */ - startup_proc = create_startup_proc (); + init_proc = create_init_proc (); + + /* Create the startup proc object for /hurd/init (PID 2). */ + startup_proc = allocate_proc (MACH_PORT_NULL); + startup_proc->p_deadmsg = 1; + complete_proc (startup_proc, HURD_PID_STARTUP); /* Create our own proc object. */ self_proc = allocate_proc (mach_task_self ()); |