exectd/tests/02_execute.c

14 lines
444 B
C
Raw Normal View History

2024-11-16 01:41:47 +00:00
#include "../include/exectd.h"
int main() {
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;
}