summaryrefslogtreecommitdiff
path: root/Kernel/init.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-11-03 10:49:13 +0100
committerAndreas Kling <awesomekling@gmail.com>2018-11-03 10:55:02 +0100
commitdd060d0fa895baa16eb465f2e7cedfb52534df5e (patch)
tree7db62694825e6d1081eb5716385948b92857bb7f /Kernel/init.cpp
parentc5eec9cbfc33aec8ec415c1911326be4b1e3adcd (diff)
downloadserenity-dd060d0fa895baa16eb465f2e7cedfb52534df5e.zip
Share code between spawn() and exec() implementations.
Okay, now there's only one ELF loading client in the process launch code.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r--Kernel/init.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 81a3fd84f0..d6e65978de 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -145,7 +145,7 @@ static void spawn_stress()
for (unsigned i = 0; i < 10000; ++i) {
int error;
- Process::createUserProcess("/bin/id", (uid_t)100, (gid_t)100, (pid_t)0, error, nullptr, tty0);
+ Process::create_user_process("/bin/id", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty0);
// kprintf("malloc stats: alloc:%u free:%u page_aligned:%u eternal:%u\n", sum_alloc, sum_free, kmalloc_page_aligned, kmalloc_sum_eternal);
// kprintf("delta:%u\n", sum_alloc - lastAlloc);
lastAlloc = sum_alloc;
@@ -230,11 +230,11 @@ static void init_stage2()
#endif
int error;
- auto* sh0 = Process::createUserProcess("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, nullptr, tty0);
+ auto* sh0 = Process::create_user_process("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty0);
#ifdef SPAWN_MULTIPLE_SHELLS
- auto* sh1 = Process::createUserProcess("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, nullptr, tty1);
- auto* sh2 = Process::createUserProcess("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, nullptr, tty2);
- auto* sh3 = Process::createUserProcess("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, nullptr, tty3);
+ auto* sh1 = Process::create_user_process("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty1);
+ auto* sh2 = Process::create_user_process("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty2);
+ auto* sh3 = Process::create_user_process("/bin/sh", (uid_t)100, (gid_t)100, (pid_t)0, error, Vector<String>(), Vector<String>(), tty3);
#endif
#ifdef STRESS_TEST_SPAWNING