Merge pull request #32 from dram/add-execve

Add execve() system call for Linux
This commit is contained in:
David Given 2017-01-07 23:23:00 +01:00 committed by GitHub
commit 51862cff82
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 int brk(void* ptr);
extern void* sbrk(int increment); extern void* sbrk(int increment);
extern int isatty(int d); extern int isatty(int d);
extern int execve(const char *path, char *const argv[], char *const envp[]);
/* Signal handling */ /* Signal handling */

View file

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