2024-11-16 01:41:47 +00:00
|
|
|
#include "../include/exectd.h"
|
|
|
|
int main() {
|
2024-11-23 01:21:06 +00:00
|
|
|
char *argv[] = {"/bin/ping", "-c","3","myrepos.dev", NULL}; // Example arguments
|
2024-11-16 01:41:47 +00:00
|
|
|
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;
|
|
|
|
}
|