summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-07-26 16:38:29 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-08-28 23:26:39 +0200
commit193cef0bdcc7b4a7e06a6cf30e96684c9f454863 (patch)
tree54eb66507f920a6690f9fca765f4633cc585ccc7 /proc
parent9b3a87f37c4e829386ceb10de974d409a31adcf7 (diff)
Define and use symbolic names for important processes
* include/pids.h: New file. * init/init.c (frob_kernel_process): Use symbolic name for kernel process. * exec/exec.c (S_exec_init): Use symbolic name for startup process. * libdiskfs/boot-start.c (diskfs_S_fsys_init): Likewise. * libdiskfs/init-startup.c (_diskfs_init_completed): Likewise. * pfinet/main.c (arrange_shutdown_notification): Likewise. * proc/mgt.c (create_startup_proc): Likewise. * proc/main.c (main): Use symbolic name for proc process.
Diffstat (limited to 'proc')
-rw-r--r--proc/main.c3
-rw-r--r--proc/mgt.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/proc/main.c b/proc/main.c
index 494169e7..73abbc07 100644
--- a/proc/main.c
+++ b/proc/main.c
@@ -28,6 +28,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <argp.h>
#include <error.h>
#include <version.h>
+#include <pids.h>
#include "proc.h"
@@ -87,7 +88,7 @@ main (int argc, char **argv, char **envp)
self_proc = allocate_proc (mach_task_self ());
assert (self_proc);
- complete_proc (self_proc, 0);
+ complete_proc (self_proc, HURD_PID_PROC);
startup_port = ports_get_send_right (startup_proc);
err = startup_procinit (boot, startup_port, &startup_proc->p_task,
diff --git a/proc/mgt.c b/proc/mgt.c
index 7af9c1aa..1a881d0c 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -32,6 +32,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/resource.h>
#include <hurd/auth.h>
#include <assert.h>
+#include <pids.h>
#include "proc.h"
#include "process_S.h"
@@ -582,7 +583,7 @@ create_startup_proc (void)
p = allocate_proc (MACH_PORT_NULL);
assert (p);
- p->p_pid = 1;
+ p->p_pid = HURD_PID_STARTUP;
p->p_parent = p;
p->p_sib = 0;