mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:37:45 +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
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue