Add execve() system call for Linux

This commit is contained in:
Xin Wang 2017-01-06 18:33:52 +08:00
parent decf0f5e9c
commit 24d26b2826
3 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,7 @@
#include <unistd.h>
#include "libsys.h"
int execve(const char *path, char *const argv[], char *const envp[])
{
return _syscall(__NR_execve, (quad) path, (quad) argv, (quad) envp);
}

View file

@ -69,6 +69,7 @@ extern pid_t getpid(void);
extern int brk(void* ptr);
extern void* sbrk(int increment);
extern int isatty(int d);
extern int execve(const char *path, char *const argv[], char *const envp[]);
/* Signal handling */

View file

@ -67,6 +67,7 @@ extern pid_t getpid(void);
extern int brk(void* ptr);
extern void* sbrk(int increment);
extern int isatty(int d);
extern int execve(const char *path, char *const argv[], char *const envp[]);
/* Signal handling */