I need to call a external program from mine.
However, I would like to make the loading only once; that is,
int proc(void *path) {
void *p;
// ...
//ELF loader
p = load_magic(path);
do {
register int t = fork();
if (!t) {
// push arguments and jump to entrypoint
exec_magic(p, _ARGS_); // execlp(path, _ARGS_);
_exit(-0x1);
}
// stuff
} while(CONDITION);
// ...
}
Is this possible?