From 28d9e59387c3c9dbdc6e569d04c53c39895e9e15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 15 Nov 2003 15:02:09 +0000 Subject: [PATCH] Added process.c to the build, implemented getpid(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5377 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/libroot/posix/unistd/Jamfile | 1 + src/kernel/libroot/posix/unistd/process.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/kernel/libroot/posix/unistd/Jamfile b/src/kernel/libroot/posix/unistd/Jamfile index c868819912..b0e7da586e 100644 --- a/src/kernel/libroot/posix/unistd/Jamfile +++ b/src/kernel/libroot/posix/unistd/Jamfile @@ -17,6 +17,7 @@ KernelMergeObject posix_unistd.o : <$(SOURCE_GRIST)>mount.c <$(SOURCE_GRIST)>open.c <$(SOURCE_GRIST)>pipe.c + <$(SOURCE_GRIST)>process.c <$(SOURCE_GRIST)>read.c <$(SOURCE_GRIST)>sleep.c <$(SOURCE_GRIST)>terminal.c diff --git a/src/kernel/libroot/posix/unistd/process.c b/src/kernel/libroot/posix/unistd/process.c index 828091f366..ba7309f2ef 100644 --- a/src/kernel/libroot/posix/unistd/process.c +++ b/src/kernel/libroot/posix/unistd/process.c @@ -10,6 +10,9 @@ #include +extern thread_id __main_thread_id; + + // ToDo: implement the process ID functions for real! @@ -23,7 +26,8 @@ getpgrp(void) pid_t getpid(void) { - return 0; + // this one returns the ID of the main thread + return __main_thread_id; }