Vhex is a kernel which provide development and retro ingenierie platform for the Casio's OS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
583 B

#include <unistd.h>
#include <stdio.h>
#include <sys/wait.h>
#include "builtin.h"
int builtin_proc(void)
char *argv[2] = {"test", NULL};
pid_t child;
int wstatus;
//puts("proc test entry :)\n");
//printf(" PPID PID PGID\n");
//printf("%-6d%-6d%-6d\n", getppid(), getpid(), getpgid());
// Try to create first child
child = fexecve("/mnt/casio/VHEX/test.elf", argv, NULL);
if (child == -1)
printf("fexecve fail :(\n");
return (0);
// Wait child death
waitpid(child, &wstatus, 0);
printf("+++ exited with %d +++\n", WEXITSTATUS(wstatus));
return (0);