From 8d16db0cc28b2d911aee918d5c3582ad29ddfeed Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Wed, 18 Sep 2013 15:59:31 +0200 Subject: 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. --- proc/proc.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'proc/proc.h') diff --git a/proc/proc.h b/proc/proc.h index a2e3c537..61966971 100644 --- a/proc/proc.h +++ b/proc/proc.h @@ -1,5 +1,6 @@ /* Process server definitions - Copyright (C) 1992,93,94,95,96,99,2000,01 Free Software Foundation, Inc. + Copyright (C) 1992,93,94,95,96,99,2000,01,13 + Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -134,7 +135,8 @@ struct exc mach_port_t authserver; struct proc *self_proc; /* process HURD_PID_PROC (us) */ -struct proc *startup_proc; /* process 1 (init) */ +struct proc *init_proc; /* process 1 (sysvinit) */ +struct proc *startup_proc; /* process 2 (hurd/init) */ struct port_bucket *proc_bucket; struct port_class *proc_class; @@ -183,7 +185,7 @@ void exc_clean (void *); struct proc *add_tasks (task_t); int pidfree (pid_t); -struct proc *create_startup_proc (void); +struct proc *create_init_proc (void); struct proc *allocate_proc (task_t); void proc_death_notify (struct proc *); void complete_proc (struct proc *, pid_t); -- cgit v1.2.3