14 lines
443 B
C
14 lines
443 B
C
#include "../include/exectd.h"
|
|
int main() {
|
|
char *argv[] = {"/bin/ping", "-c","3","google.com", NULL}; // Example arguments
|
|
char *envp[] = {NULL}; // Example environment variables
|
|
int status = execute_job("/bin/ping", argv, envp);
|
|
if (status != 0) {
|
|
// Handle error
|
|
printf("my_execve returned error code: %d\n", status);
|
|
}
|
|
|
|
// Code here will run after the child process has finished
|
|
return 0;
|
|
}
|