mirror of
https://github.com/drasko/codezero.git
synced 2026-01-28 10:43:14 +01:00
Initial changes for execve() support
This commit is contained in:
@@ -10,5 +10,6 @@ int dirtest(void);
|
||||
int fileio(void);
|
||||
int fileio2(void);
|
||||
int clonetest(void);
|
||||
void exectest(void);
|
||||
|
||||
#endif /* __TEST0_TESTS_H__ */
|
||||
|
||||
@@ -33,11 +33,12 @@ void main(void)
|
||||
|
||||
dirtest();
|
||||
|
||||
exectest();
|
||||
|
||||
/* Check mmap/munmap */
|
||||
mmaptest();
|
||||
|
||||
printf("Forking...\n");
|
||||
|
||||
if ((pid = fork()) < 0)
|
||||
printf("Error forking...\n");
|
||||
|
||||
|
||||
@@ -47,3 +47,7 @@ int clonetest(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
14
tasks/test0/src/exectest.c
Normal file
14
tasks/test0/src/exectest.c
Normal file
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Execve test.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <tests.h>
|
||||
|
||||
void exectest(void)
|
||||
{
|
||||
execve("/usr/home/bahadir/executable", 0, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user