1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:07:34 +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:
Andreas Kling 2018-11-03 10:49:13 +01:00
parent c5eec9cbfc
commit dd060d0fa8
7 changed files with 86 additions and 128 deletions

View file

@ -4,9 +4,9 @@
extern "C" {
int spawn(const char* path, const char** args)
int spawn(const char* path, const char** args, const char** envp)
{
int rc = Syscall::invoke(Syscall::Spawn, (dword)path, (dword)args);
int rc = Syscall::invoke(Syscall::Spawn, (dword)path, (dword)args, (dword)envp);
__RETURN_WITH_ERRNO(rc, rc, -1);
}

View file

@ -1,10 +1,11 @@
#pragma once
#include <sys/cdefs.h>
#include <sys/types.h>
__BEGIN_DECLS
int spawn(const char* path, const char** args);
pid_t spawn(const char* path, const char** args, const char** envp);
__END_DECLS