mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
Share code between spawn() and exec() implementations.
Okay, now there's only one ELF loading client in the process launch code.
This commit is contained in:
parent
c5eec9cbfc
commit
dd060d0fa8
7 changed files with 86 additions and 128 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue